mirror of
https://github.com/fosrl/pangolin.git
synced 2025-07-14 16:04:56 +02:00
Remove org get for testing
This commit is contained in:
parent
6fc5903b9b
commit
02d185f713
1 changed files with 15 additions and 15 deletions
|
@ -21,22 +21,22 @@ export default async function RootLayout({
|
|||
}: Readonly<{
|
||||
children: React.ReactNode;
|
||||
}>) {
|
||||
let orgs: ListOrgsResponse["orgs"] = [];
|
||||
try {
|
||||
const res = await internal.get<AxiosResponse<ListOrgsResponse>>(
|
||||
`/orgs`,
|
||||
authCookieHeader(),
|
||||
);
|
||||
if (res && res.data.data.orgs) {
|
||||
orgs = res.data.data.orgs;
|
||||
}
|
||||
// let orgs: ListOrgsResponse["orgs"] = [];
|
||||
// try {
|
||||
// const res = await internal.get<AxiosResponse<ListOrgsResponse>>(
|
||||
// `/orgs`,
|
||||
// authCookieHeader(),
|
||||
// );
|
||||
// if (res && res.data.data.orgs) {
|
||||
// orgs = res.data.data.orgs;
|
||||
// }
|
||||
|
||||
if (!orgs.length) {
|
||||
redirect(`/setup`);
|
||||
}
|
||||
} catch (e) {
|
||||
console.error("Error fetching orgs", e);
|
||||
}
|
||||
// if (!orgs.length) {
|
||||
// redirect(`/setup`);
|
||||
// }
|
||||
// } catch (e) {
|
||||
// console.error("Error fetching orgs", e);
|
||||
// }
|
||||
|
||||
return (
|
||||
<html suppressHydrationWarning>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue