mirror of
https://github.com/lukevella/rallly.git
synced 2025-07-25 04:08:00 +02:00
💄 Stylize detected timezone (#1311)
This commit is contained in:
parent
6ed89c897b
commit
c093066f9e
2 changed files with 7 additions and 5 deletions
|
@ -270,7 +270,7 @@
|
|||
"downloadICSFile": "Download ICS File",
|
||||
"schedulateDate": "Scheduled Date",
|
||||
"timeZoneChangeDetectorTitle": "Timezone Change Detected",
|
||||
"timeZoneChangeDetectorMessage": "Your timezone has changed to {currentTimeZone}. Do you want to update your preferences?",
|
||||
"timeZoneChangeDetectorMessage": "Your timezone has changed to <b>{currentTimeZone}</b>. Do you want to update your preferences?",
|
||||
"yesUpdateTimezone": "Yes, update my timezone",
|
||||
"noKeepCurrentTimezone": "No, keep the current timezone",
|
||||
"annualBenefit": "{count} months free"
|
||||
|
|
|
@ -8,6 +8,7 @@ import {
|
|||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from "@rallly/ui/dialog";
|
||||
import * as Sentry from "@sentry/nextjs";
|
||||
import { usePostHog } from "posthog-js/react";
|
||||
import React, { useState } from "react";
|
||||
|
||||
|
@ -25,7 +26,7 @@ export function TimeZoneChangeDetector() {
|
|||
return cachedPreviousTimeZone;
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
Sentry.captureException(e);
|
||||
}
|
||||
|
||||
const timeZone = preferences.timeZone ?? getBrowserTimeZone();
|
||||
|
@ -33,7 +34,7 @@ export function TimeZoneChangeDetector() {
|
|||
try {
|
||||
localStorage.setItem("previousTimeZone", timeZone);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
Sentry.captureException(e);
|
||||
}
|
||||
|
||||
return timeZone;
|
||||
|
@ -61,10 +62,11 @@ export function TimeZoneChangeDetector() {
|
|||
/>
|
||||
</DialogTitle>
|
||||
</DialogHeader>
|
||||
<p className="text-muted-foreground text-sm">
|
||||
<p className="text-muted-foreground text-sm leading-relaxed">
|
||||
<Trans
|
||||
i18nKey="timeZoneChangeDetectorMessage"
|
||||
defaults="Your timezone has changed to {currentTimeZone}. Do you want to update your preferences?"
|
||||
defaults="Your timezone has changed to <b>{currentTimeZone}</b>. Do you want to update your preferences?"
|
||||
components={{ b: <b className="text-foreground font-medium" /> }}
|
||||
values={{ currentTimeZone }}
|
||||
/>
|
||||
</p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue