diff --git a/app/(dashboard)/[tenant]/settings/actions.ts b/app/(dashboard)/[tenant]/settings/actions.ts
index bc1e69b..1448a3f 100644
--- a/app/(dashboard)/[tenant]/settings/actions.ts
+++ b/app/(dashboard)/[tenant]/settings/actions.ts
@@ -1,5 +1,7 @@
"use server";
+import { updateUser } from "@/lib/ops/auth";
+import { getOwner } from "@/lib/utils/useOwner";
import { cookies } from "next/headers";
export async function saveUserTimezone(timezone: string) {
@@ -9,4 +11,7 @@ export async function saveUserTimezone(timezone: string) {
sameSite: "strict",
maxAge: 60 * 60 * 24 * 365,
});
+
+ const { userId } = await getOwner();
+ await updateUser(userId, { customData: { timezone } });
}
diff --git a/components/console/navbar.tsx b/components/console/navbar.tsx
index 7387f52..9dbd579 100644
--- a/components/console/navbar.tsx
+++ b/components/console/navbar.tsx
@@ -1,7 +1,8 @@
+import type { Organization } from "@/lib/ops/auth";
import Image from "next/image";
import Link from "next/link";
import logo from "../../public/images/logo.png";
-import { OrgSwitcher, type Organization, UserButton } from "../core/auth";
+import { OrgSwitcher, UserButton } from "../core/auth";
import NavBarLinks from "./navbar-links";
export default function NavBar({
diff --git a/components/core/auth.tsx b/components/core/auth.tsx
index d70c84d..e4618d8 100644
--- a/components/core/auth.tsx
+++ b/components/core/auth.tsx
@@ -1,4 +1,5 @@
import { logtoConfig } from "@/app/logto";
+import type { Organization } from "@/lib/ops/auth";
import { signOut } from "@logto/next/server-actions";
import { ChevronsUpDown, Plus, User } from "lucide-react";
import Link from "next/link";
@@ -12,13 +13,6 @@ import {
DropdownMenuTrigger,
} from "../ui/dropdown-menu";
-// WIP, this should be changed
-export type Organization = {
- id: string;
- name: string;
- slug: string;
-};
-
export const OrgSwitcher = ({
orgs,
activeOrg,
@@ -67,7 +61,11 @@ export const OrgSwitcher = ({
// }
>
-
+