feat: remove timezone
This commit is contained in:
parent
2ab65bb375
commit
dee9a6d5f0
|
|
@ -18,13 +18,13 @@ import { FacebookComponent } from '@gitroom/frontend/components/layout/facebook.
|
|||
import { headers } from 'next/headers';
|
||||
import { headerName } from '@gitroom/react/translation/i18n.config';
|
||||
import { HtmlComponent } from '@gitroom/frontend/components/layout/html.component';
|
||||
import dynamicLoad from 'next/dynamic';
|
||||
const SetTimezone = dynamicLoad(
|
||||
() => import('@gitroom/frontend/components/layout/set.timezone'),
|
||||
{
|
||||
ssr: false,
|
||||
}
|
||||
);
|
||||
// import dynamicLoad from 'next/dynamic';
|
||||
// const SetTimezone = dynamicLoad(
|
||||
// () => import('@gitroom/frontend/components/layout/set.timezone'),
|
||||
// {
|
||||
// ssr: false,
|
||||
// }
|
||||
// );
|
||||
|
||||
const jakartaSans = Plus_Jakarta_Sans({
|
||||
weight: ['600', '500'],
|
||||
|
|
@ -79,7 +79,7 @@ export default async function AppLayout({ children }: { children: ReactNode }) {
|
|||
}
|
||||
>
|
||||
<SentryComponent>
|
||||
<SetTimezone />
|
||||
{/*<SetTimezone />*/}
|
||||
<HtmlComponent />
|
||||
<ToltScript />
|
||||
<FacebookComponent />
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ export const getTimezone = () => {
|
|||
};
|
||||
|
||||
export const newDayjs = (config?: ConfigType) => {
|
||||
return dayjs.tz(config, getTimezone());
|
||||
return dayjs(config);
|
||||
};
|
||||
|
||||
const SetTimezone: FC = () => {
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ const dateMetrics = [
|
|||
|
||||
import dayjs from 'dayjs';
|
||||
import timezone from 'dayjs/plugin/timezone';
|
||||
import { timezoneSaver } from '@gitroom/frontend/components/layout/set.timezone';
|
||||
dayjs.extend(timezone);
|
||||
|
||||
const MetricComponent = () => {
|
||||
|
|
@ -46,23 +47,23 @@ const MetricComponent = () => {
|
|||
))}
|
||||
</Select>
|
||||
|
||||
<div className="mt-[4px]">Current Timezone</div>
|
||||
<Select
|
||||
name="timezone"
|
||||
disableForm={true}
|
||||
label=""
|
||||
onChange={changeTimezone}
|
||||
>
|
||||
{timezones.map((metric) => (
|
||||
<option
|
||||
key={metric.name}
|
||||
value={metric.tzCode}
|
||||
selected={metric.tzCode === timezone}
|
||||
>
|
||||
{metric.label}
|
||||
</option>
|
||||
))}
|
||||
</Select>
|
||||
{/*<div className="mt-[4px]">Current Timezone</div>*/}
|
||||
{/*<Select*/}
|
||||
{/* name="timezone"*/}
|
||||
{/* disableForm={true}*/}
|
||||
{/* label=""*/}
|
||||
{/* onChange={changeTimezone}*/}
|
||||
{/*>*/}
|
||||
{/* {timezones.map((metric) => (*/}
|
||||
{/* <option*/}
|
||||
{/* key={metric.name}*/}
|
||||
{/* value={metric.tzCode}*/}
|
||||
{/* selected={metric.tzCode === timezone}*/}
|
||||
{/* >*/}
|
||||
{/* {metric.label}*/}
|
||||
{/* </option>*/}
|
||||
{/* ))}*/}
|
||||
{/*</Select>*/}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue