improve site and resource info cards and other small visual tweaks

This commit is contained in:
Milo Schwartz
2024-12-30 23:41:06 -05:00
parent e6263567a9
commit 172e0f07d5
31 changed files with 469 additions and 332 deletions

View File

@@ -11,9 +11,10 @@ import {
BreadcrumbLink,
BreadcrumbList,
BreadcrumbPage,
BreadcrumbSeparator,
BreadcrumbSeparator
} from "@/components/ui/breadcrumb";
import Link from "next/link";
import { cache } from "react";
interface UserLayoutProps {
children: React.ReactNode;
@@ -27,10 +28,13 @@ export default async function UserLayoutProps(props: UserLayoutProps) {
let user = null;
try {
const res = await internal.get<AxiosResponse<GetOrgUserResponse>>(
`/org/${params.orgId}/user/${params.userId}`,
await authCookieHeader(),
const getOrgUser = cache(async () =>
internal.get<AxiosResponse<GetOrgUserResponse>>(
`/org/${params.orgId}/user/${params.userId}`,
await authCookieHeader()
)
);
const res = await getOrgUser();
user = res.data.data;
} catch {
redirect(`/${params.orgId}/settings/sites`);
@@ -39,8 +43,8 @@ export default async function UserLayoutProps(props: UserLayoutProps) {
const sidebarNavItems = [
{
title: "Access Controls",
href: "/{orgId}/settings/access/users/{userId}/access-controls",
},
href: "/{orgId}/settings/access/users/{userId}/access-controls"
}
];
return (

View File

@@ -15,6 +15,8 @@ type UsersPageProps = {
params: Promise<{ orgId: string }>;
};
export const dynamic = "force-dynamic";
export default async function UsersPage(props: UsersPageProps) {
const params = await props.params;