Skip to content

Commit

Permalink
team settings wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mcstepp committed Dec 20, 2024
1 parent 8e4dde4 commit a6aed53
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions apps/dashboard/app/(app)/settings/team/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ import {
TableHeader,
TableRow,
} from "@/components/ui/table";
import { useAuth, useClerk, useOrganization } from "@clerk/nextjs";

import { Loading } from "@/components/dashboard/loading";
import { Navbar as SubMenu } from "@/components/dashboard/navbar";
import { Navbar } from "@/components/navbar";
Expand All @@ -32,23 +30,32 @@ import {
SelectValue,
} from "@/components/ui/select";
import { toast } from "@/components/ui/toaster";
import type { MembershipRole } from "@clerk/types";
import { Gear } from "@unkey/icons";
import Link from "next/link";
import { navigation } from "../constants";
import { getCurrentUser, getOrg } from "@/lib/auth/actions";
import { getWorkspace } from "@/lib/auth";

type Member = {
id: string;
name: string;
image: string;
role: MembershipRole;
role: "basic_member" | "admin";
email?: string;
};

export default function TeamPage() {
const { user, organization } = useClerk();
export default async function TeamPage() {
const user = await getCurrentUser();
if (!user || !user.orgId) {
return null;
}
const { orgId } = user;
const organization = await getOrg(orgId);
const workspace = await getWorkspace(orgId); // temporary until we refactor the tabs to separate component

const isFreeWorkspace = workspace.plan === "free";

if (!organization) {
if (isFreeWorkspace) {
return (
<div>
<Navbar>
Expand Down

0 comments on commit a6aed53

Please sign in to comment.