teableio/teable

View on GitHub
packages/sdk/src/hooks/use-view-id.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { useContext } from 'react';
import { AnchorContext } from '../context';

// use current active view id
export function useViewId() {
  const { viewId } = useContext(AnchorContext);
  return viewId;
}