diff --git a/frontend/appflowy_tauri/src/appflowy_app/components/grid/Grid/Grid.tsx b/frontend/appflowy_tauri/src/appflowy_app/components/grid/Grid/Grid.tsx index 69bd3e7a0e..3c85c40a71 100644 --- a/frontend/appflowy_tauri/src/appflowy_app/components/grid/Grid/Grid.tsx +++ b/frontend/appflowy_tauri/src/appflowy_app/components/grid/Grid/Grid.tsx @@ -40,7 +40,7 @@ export const Grid = ({ viewId }: { viewId: string }) => { - + {showGridRow && boardRowInfo && ( { - const { grid } = useAppSelector((state) => state); - const { rows } = grid; - - return { - count: rows.length, - }; -}; diff --git a/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridTableCount/GridTableCount.tsx b/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridTableCount/GridTableCount.tsx index f067a0bad9..727f831a81 100644 --- a/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridTableCount/GridTableCount.tsx +++ b/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridTableCount/GridTableCount.tsx @@ -1,7 +1,7 @@ -import { useGridTableCount } from './GridTableCount.hooks'; +import { RowInfo } from '@/appflowy_app/stores/effects/database/row/row_cache'; -export const GridTableCount = () => { - const { count } = useGridTableCount(); +export const GridTableCount = ({ rows }: { rows: readonly RowInfo[] }) => { + const count = rows.length; return ( Count : {count}