mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-09 04:06:36 +00:00
improve site and resource info cards and other small visual tweaks
This commit is contained in:
@@ -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 (
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user