mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-14 02:17:34 +00:00
Merge pull request #402 from jmblab-adam/int-momentjs
feat: configure internationalization for Moment.js
This commit is contained in:
@@ -6,6 +6,7 @@ import { XCircleIcon } from "@heroicons/react/24/outline";
|
||||
import { Timestamp, timestampDate } from "@zitadel/client";
|
||||
import { Session } from "@zitadel/proto/zitadel/session/v2/session_pb";
|
||||
import moment from "moment";
|
||||
import { useLocale } from "next-intl";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import { Avatar } from "./avatar";
|
||||
@@ -37,6 +38,9 @@ export function SessionItem({
|
||||
reload: () => void;
|
||||
requestId?: string;
|
||||
}) {
|
||||
const currentLocale = useLocale();
|
||||
moment.locale(currentLocale === "zh" ? "zh-cn" : currentLocale);
|
||||
|
||||
const [loading, setLoading] = useState<boolean>(false);
|
||||
|
||||
async function clearSession(id: string) {
|
||||
|
Reference in New Issue
Block a user