Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/web/public/locales/en/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
10 changes: 6 additions & 4 deletions apps/web/src/app/[locale]/timezone-change-detector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand All @@ -25,15 +26,15 @@ export function TimeZoneChangeDetector() {
return cachedPreviousTimeZone;
}
} catch (e) {
console.error(e);
Sentry.captureException(e);
}

const timeZone = preferences.timeZone ?? getBrowserTimeZone();

try {
localStorage.setItem("previousTimeZone", timeZone);
} catch (e) {
console.error(e);
Sentry.captureException(e);
}

return timeZone;
Expand Down Expand Up @@ -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>
Expand Down