mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-15 04:51:06 +02:00
[enhancement]: support serach on settings page
This commit is contained in:
@@ -2,18 +2,24 @@ import { Flex } from '@mantine/core';
|
||||
import { SettingsContent } from '/@/renderer/features/settings/components/settings-content';
|
||||
import { SettingsHeader } from '/@/renderer/features/settings/components/settings-header';
|
||||
import { AnimatedPage } from '/@/renderer/features/shared';
|
||||
import { SettingSearchContext } from '/@/renderer/features/settings/context/search-context';
|
||||
import { useState } from 'react';
|
||||
|
||||
const SettingsRoute = () => {
|
||||
const [search, setSearch] = useState('');
|
||||
|
||||
return (
|
||||
<AnimatedPage>
|
||||
<Flex
|
||||
direction="column"
|
||||
h="100%"
|
||||
w="100%"
|
||||
>
|
||||
<SettingsHeader />
|
||||
<SettingsContent />
|
||||
</Flex>
|
||||
<SettingSearchContext.Provider value={search}>
|
||||
<Flex
|
||||
direction="column"
|
||||
h="100%"
|
||||
w="100%"
|
||||
>
|
||||
<SettingsHeader setSearch={setSearch} />
|
||||
<SettingsContent />
|
||||
</Flex>
|
||||
</SettingSearchContext.Provider>
|
||||
</AnimatedPage>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user