Skip to content

Commit dee9a6d

Browse files
committed
feat: remove timezone
1 parent 2ab65bb commit dee9a6d

File tree

3 files changed

+27
-26
lines changed

3 files changed

+27
-26
lines changed

apps/frontend/src/app/(app)/layout.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ import { FacebookComponent } from '@gitroom/frontend/components/layout/facebook.
1818
import { headers } from 'next/headers';
1919
import { headerName } from '@gitroom/react/translation/i18n.config';
2020
import { HtmlComponent } from '@gitroom/frontend/components/layout/html.component';
21-
import dynamicLoad from 'next/dynamic';
22-
const SetTimezone = dynamicLoad(
23-
() => import('@gitroom/frontend/components/layout/set.timezone'),
24-
{
25-
ssr: false,
26-
}
27-
);
21+
// import dynamicLoad from 'next/dynamic';
22+
// const SetTimezone = dynamicLoad(
23+
// () => import('@gitroom/frontend/components/layout/set.timezone'),
24+
// {
25+
// ssr: false,
26+
// }
27+
// );
2828

2929
const jakartaSans = Plus_Jakarta_Sans({
3030
weight: ['600', '500'],
@@ -79,7 +79,7 @@ export default async function AppLayout({ children }: { children: ReactNode }) {
7979
}
8080
>
8181
<SentryComponent>
82-
<SetTimezone />
82+
{/*<SetTimezone />*/}
8383
<HtmlComponent />
8484
<ToltScript />
8585
<FacebookComponent />

apps/frontend/src/components/layout/set.timezone.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const getTimezone = () => {
1616
};
1717

1818
export const newDayjs = (config?: ConfigType) => {
19-
return dayjs.tz(config, getTimezone());
19+
return dayjs(config);
2020
};
2121

2222
const SetTimezone: FC = () => {

apps/frontend/src/components/settings/metric.component.tsx

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const dateMetrics = [
1111

1212
import dayjs from 'dayjs';
1313
import timezone from 'dayjs/plugin/timezone';
14+
import { timezoneSaver } from '@gitroom/frontend/components/layout/set.timezone';
1415
dayjs.extend(timezone);
1516

1617
const MetricComponent = () => {
@@ -46,23 +47,23 @@ const MetricComponent = () => {
4647
))}
4748
</Select>
4849

49-
<div className="mt-[4px]">Current Timezone</div>
50-
<Select
51-
name="timezone"
52-
disableForm={true}
53-
label=""
54-
onChange={changeTimezone}
55-
>
56-
{timezones.map((metric) => (
57-
<option
58-
key={metric.name}
59-
value={metric.tzCode}
60-
selected={metric.tzCode === timezone}
61-
>
62-
{metric.label}
63-
</option>
64-
))}
65-
</Select>
50+
{/*<div className="mt-[4px]">Current Timezone</div>*/}
51+
{/*<Select*/}
52+
{/* name="timezone"*/}
53+
{/* disableForm={true}*/}
54+
{/* label=""*/}
55+
{/* onChange={changeTimezone}*/}
56+
{/*>*/}
57+
{/* {timezones.map((metric) => (*/}
58+
{/* <option*/}
59+
{/* key={metric.name}*/}
60+
{/* value={metric.tzCode}*/}
61+
{/* selected={metric.tzCode === timezone}*/}
62+
{/* >*/}
63+
{/* {metric.label}*/}
64+
{/* </option>*/}
65+
{/* ))}*/}
66+
{/*</Select>*/}
6667
</div>
6768
);
6869
};

0 commit comments

Comments
 (0)