Files
Homarr/src/components/Settings/Common/CommonSettings.tsx

31 lines
895 B
TypeScript
Raw Normal View History

2023-01-04 22:39:58 +09:00
import { ScrollArea, Space, Stack, Text } from '@mantine/core';
2022-12-06 21:22:37 +01:00
import { useConfigContext } from '../../../config/provider';
import ConfigChanger from '../../Config/ConfigChanger';
import ConfigActions from './Config/ConfigActions';
import LanguageSelect from './Language/LanguageSelect';
import { SearchEngineSelector } from './SearchEngine/SearchEngineSelector';
2022-06-07 08:21:03 +02:00
2022-12-04 17:36:30 +01:00
export default function CommonSettings() {
const { config } = useConfigContext();
2022-06-07 08:21:03 +02:00
2022-12-04 17:36:30 +01:00
if (!config) {
return (
<Text color="red" align="center">
No active config
</Text>
);
}
2022-06-07 08:21:03 +02:00
return (
2023-01-04 22:39:58 +09:00
<Stack mb="md" mt="xs">
<ScrollArea style={{ height: '76vh' }} offsetScrollbars>
<SearchEngineSelector searchEngine={config.settings.common.searchEngine} />
<Space />
<LanguageSelect />
<ConfigChanger />
<ConfigActions />
</ScrollArea>
</Stack>
2022-06-07 08:21:03 +02:00
);
}