Remove org get for testing

This commit is contained in:
Owen Schwartz 2024-10-20 15:21:22 -04:00
parent 6fc5903b9b
commit 02d185f713
No known key found for this signature in database
GPG key ID: 8271FDFFD9E0CCBD

View file

@ -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>