Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

Commit d68973e

Browse files
authored
Merge pull request #107 from 7w1/reset-timezone-fixes
fixes #103 adds a reset and relabels system button
2 parents 4cae450 + fcf50d6 commit d68973e

1 file changed

Lines changed: 21 additions & 5 deletions

File tree

‎src/app/features/settings/account/TimezoneEditor.tsx‎

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useMemo, useState, useEffect, ChangeEvent } from 'react';
2-
import { Box, IconButton, Icon, Icons, Input } from 'folds';
2+
import { Box, IconButton, Button, Icon, Icons, Input, Text } from 'folds';
33
import { SettingTile } from '$components/setting-tile';
44

55
interface IntlWithSupportedValues {
@@ -26,6 +26,11 @@ export function TimezoneEditor({ current, onSave }: TimezoneEditorProps) {
2626
onSave(systemTz);
2727
};
2828

29+
const handleReset = () => {
30+
setVal('');
31+
onSave('');
32+
};
33+
2934
const handleManualSave = () => {
3035
const trimmed = val.trim().slice(0, 64);
3136
const matchedZone = zones.find((z) => z.toLowerCase() === trimmed.toLowerCase());
@@ -64,14 +69,25 @@ export function TimezoneEditor({ current, onSave }: TimezoneEditorProps) {
6469
</option>
6570
))}
6671
</datalist>
67-
<IconButton
68-
size="300"
72+
<Button
6973
variant="Secondary"
74+
fill="Soft"
75+
size="300"
76+
radii="300"
77+
outlined
7078
onClick={handleSync}
79+
>
80+
<Text size="B300">System</Text>
81+
</Button>
82+
<IconButton
83+
size="300"
84+
variant="Critical"
85+
fill="None"
86+
onClick={handleReset}
7187
radii="300"
72-
title="Sync with system"
88+
title="Reset"
7389
>
74-
<Icon src={Icons.Reload} size="100" />
90+
<Icon src={Icons.Cross} size="100" />
7591
</IconButton>
7692
</Box>
7793
}

0 commit comments

Comments
 (0)