MCPcopy
hub / github.com/gitify-app/gitify / SettingsReset

Function SettingsReset

src/renderer/components/settings/SettingsReset.tsx:9–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7import { rendererLogInfo } from '../../utils/core/logger';
8
9export const SettingsReset: FC = () => {
10 const { resetSettings } = useAppContext();
11
12 const confirm = useConfirm();
13
14 const handleReset = async () => {
15 const confirmed = await confirm({
16 title: 'Reset settings?',
17 content:
18 'Please confirm that you want to reset all settings to the Gitify defaults',
19
20 confirmButtonContent: 'Reset',
21 cancelButtonContent: 'Cancel',
22 confirmButtonType: 'danger',
23 });
24
25 if (confirmed) {
26 resetSettings();
27 rendererLogInfo('settingsReset', 'Settings have been reset to defaults');
28 }
29 };
30
31 return (
32 <Stack align="center">
33 <Button
34 className="w-[200px]"
35 data-testid="settings-reset"
36 onClick={handleReset}
37 variant="danger"
38 >
39 Reset Settings
40 </Button>
41 </Stack>
42 );
43};

Callers

nothing calls this directly

Calls 1

useAppContextFunction · 0.90

Tested by

no test coverage detected