mirror of
https://github.com/jeffvli/feishin.git
synced 2026-06-18 01:14:22 +02:00
reimplement search page
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
import type { AgGridReact as AgGridReactType } from '@ag-grid-community/react/lib/agGridReact';
|
||||
|
||||
import { useId, useRef } from 'react';
|
||||
import { useId } from 'react';
|
||||
import { useLocation, useParams } from 'react-router';
|
||||
|
||||
import { SearchContent } from '/@/renderer/features/search/components/search-content';
|
||||
@@ -12,12 +10,11 @@ const SearchRoute = () => {
|
||||
const localNavigationId = useId();
|
||||
const navigationId = locationState?.navigationId || localNavigationId;
|
||||
const { itemType } = useParams() as { itemType: string };
|
||||
const tableRef = useRef<AgGridReactType | null>(null);
|
||||
|
||||
return (
|
||||
<AnimatedPage key={`search-${navigationId}`}>
|
||||
<SearchHeader navigationId={navigationId} tableRef={tableRef} />
|
||||
<SearchContent key={`page-${itemType}`} tableRef={tableRef} />
|
||||
<SearchHeader navigationId={navigationId} />
|
||||
<SearchContent key={`page-${itemType}`} />
|
||||
</AnimatedPage>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user