mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-03 09:16:40 +00:00
Merge branch 'main' of https://github.com/fosrl/pangolin
This commit is contained in:
@@ -21,22 +21,22 @@ export default async function RootLayout({
|
|||||||
}: Readonly<{
|
}: Readonly<{
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
}>) {
|
}>) {
|
||||||
let orgs: ListOrgsResponse["orgs"] = [];
|
// let orgs: ListOrgsResponse["orgs"] = [];
|
||||||
try {
|
// try {
|
||||||
const res = await internal.get<AxiosResponse<ListOrgsResponse>>(
|
// const res = await internal.get<AxiosResponse<ListOrgsResponse>>(
|
||||||
`/orgs`,
|
// `/orgs`,
|
||||||
authCookieHeader(),
|
// authCookieHeader(),
|
||||||
);
|
// );
|
||||||
if (res && res.data.data.orgs) {
|
// if (res && res.data.data.orgs) {
|
||||||
orgs = res.data.data.orgs;
|
// orgs = res.data.data.orgs;
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (!orgs.length) {
|
// if (!orgs.length) {
|
||||||
redirect(`/setup`);
|
// redirect(`/setup`);
|
||||||
}
|
// }
|
||||||
} catch (e) {
|
// } catch (e) {
|
||||||
console.error("Error fetching orgs", e);
|
// console.error("Error fetching orgs", e);
|
||||||
}
|
// }
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<html suppressHydrationWarning>
|
<html suppressHydrationWarning>
|
||||||
|
|||||||
Reference in New Issue
Block a user