feat(events): add weekly browsing and personal registrations
This commit is contained in:
1 parent
25d0a13050
commit
96d3e3f602
7 files changed
+655
-74
No files matched your search
@@ -0,0 +1,18 @@
|
||||
"use client";
|
||||
import { useLocale } from "next-intl";
|
||||
import { useEffect, useState } from "react";
|
||||
export function LocalEventTime({ value }: { value: string }) {
|
||||
const locale = useLocale();
|
||||
const [text, setText] = useState(
|
||||
`${value.slice(0, 16).replace("T", " ")} UTC`,
|
||||
);
|
||||
useEffect(() => {
|
||||
setText(
|
||||
new Intl.DateTimeFormat(locale, {
|
||||
dateStyle: "medium",
|
||||
timeStyle: "short",
|
||||
}).format(new Date(value)),
|
||||
);
|
||||
}, [locale, value]);
|
||||
return <time dateTime={value}>{text}</time>;
|
||||
}
|
||||
Reference in new issue
Block a user