Skip to content

Commit

Permalink
fix: hot reload crash in homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
limwa committed Jan 5, 2025
1 parent e5d58d5 commit 5c4a597
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 1 addition & 3 deletions website/inertia/lib/countdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,5 @@ export function createCountdown({
// tick once so listeners are up-to-date
tick()

return {
abort: controller.abort,
}
return { abort: controller.abort.bind(controller) }
}
8 changes: 4 additions & 4 deletions website/inertia/pages/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function Countdown() {
)}
>
<div className="bg-enei-beige bg-opacity-[62%] w-24 md:w-32 text-center shadow-[0_4px_4px_rgba(0_0_0_/_25%)]">
<p className="font-space-grotesk text-enei-blue text-4xl md:text-6xl font-bold mt-10 [text-shadow:_-1px_0_#efe3ca,_0_1px_#efe3ca,_1px_0_#efe3ca,_0_-1px_#efe3ca]">
<p className="tabular-nums font-space-grotesk text-enei-blue text-4xl md:text-6xl font-bold mt-10 [text-shadow:_-1px_0_#efe3ca,_0_1px_#efe3ca,_1px_0_#efe3ca,_0_-1px_#efe3ca]">
{timeLeft?.days.toLocaleString('en-US', {
minimumIntegerDigits: 2,
useGrouping: false,
Expand All @@ -31,7 +31,7 @@ function Countdown() {
</p>
</div>
<div className="bg-enei-beige bg-opacity-[62%] w-24 md:w-32 text-center shadow-[0_4px_4px_rgba(0_0_0_/_25%)]">
<p className="font-space-grotesk text-enei-blue text-4xl md:text-6xl font-bold mt-10 [text-shadow:_-1px_0_#efe3ca,_0_1px_#efe3ca,_1px_0_#efe3ca,_0_-1px_#efe3ca]">
<p className="tabular-nums font-space-grotesk text-enei-blue text-4xl md:text-6xl font-bold mt-10 [text-shadow:_-1px_0_#efe3ca,_0_1px_#efe3ca,_1px_0_#efe3ca,_0_-1px_#efe3ca]">
{timeLeft?.hours.toLocaleString('en-US', {
minimumIntegerDigits: 2,
useGrouping: false,
Expand All @@ -43,7 +43,7 @@ function Countdown() {
</div>

<div className="bg-enei-beige bg-opacity-[62%] w-24 md:w-32 text-center shadow-[0_4px_4px_rgba(0_0_0_/_25%)]">
<p className="font-space-grotesk text-enei-blue text-4xl md:text-6xl font-bold mt-10 [text-shadow:_-1px_0_#efe3ca,_0_1px_#efe3ca,_1px_0_#efe3ca,_0_-1px_#efe3ca]">
<p className="tabular-nums font-space-grotesk text-enei-blue text-4xl md:text-6xl font-bold mt-10 [text-shadow:_-1px_0_#efe3ca,_0_1px_#efe3ca,_1px_0_#efe3ca,_0_-1px_#efe3ca]">
{timeLeft?.minutes.toLocaleString('en-US', {
minimumIntegerDigits: 2,
useGrouping: false,
Expand All @@ -55,7 +55,7 @@ function Countdown() {
</div>

<div className="bg-enei-beige bg-opacity-[62%] w-24 md:w-32 text-center shadow-[0_4px_4px_rgba(0_0_0_/_25%)]">
<p className="font-space-grotesk text-enei-blue text-4xl md:text-6xl font-bold mt-10 [text-shadow:_-1px_0_#efe3ca,_0_1px_#efe3ca,_1px_0_#efe3ca,_0_-1px_#efe3ca]">
<p className="tabular-nums font-space-grotesk text-enei-blue text-4xl md:text-6xl font-bold mt-10 [text-shadow:_-1px_0_#efe3ca,_0_1px_#efe3ca,_1px_0_#efe3ca,_0_-1px_#efe3ca]">
{timeLeft?.seconds.toLocaleString('en-US', {
minimumIntegerDigits: 2,
useGrouping: false,
Expand Down

0 comments on commit 5c4a597

Please sign in to comment.