From 7b9d09b648d1fb0145325468f490bf2f8a0cc00a Mon Sep 17 00:00:00 2001 From: virinci Date: Thu, 5 Dec 2024 10:09:30 +0530 Subject: [PATCH 1/3] Show mock submissions if empty --- app/[orgId]/submissions/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/[orgId]/submissions/page.tsx b/app/[orgId]/submissions/page.tsx index b6f2ebf..9281662 100644 --- a/app/[orgId]/submissions/page.tsx +++ b/app/[orgId]/submissions/page.tsx @@ -30,7 +30,7 @@ export default function SubmissionsPage({ const response = await fetch(`/api/orgs/${params.orgId}/submissions`); if (!response.ok) throw new Error("Failed to fetch submissions"); const data = await response.json(); - setSubmissions(data); + setSubmissions(data && data.length ? data : mockSubmissions); } catch (error) { console.error("Error fetching submissions:", error); setSubmissions(mockSubmissions); From 0dfa313db226f1770f5b80a32115d2b6c7b00656 Mon Sep 17 00:00:00 2001 From: virinci Date: Thu, 5 Dec 2024 10:10:49 +0530 Subject: [PATCH 2/3] Redirect to hardcoded org after login and signup --- components/auth-component.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/auth-component.tsx b/components/auth-component.tsx index 397d34c..0000c83 100644 --- a/components/auth-component.tsx +++ b/components/auth-component.tsx @@ -63,7 +63,7 @@ export function AuthComponent({ method: "POST", body: JSON.stringify(values), }); - router.push("/"); // Redirect to home page after successful login + router.push("/iiits"); // Redirect to home page after successful login } catch (error) { console.error(error); toast({ @@ -80,7 +80,7 @@ export function AuthComponent({ method: "POST", body: JSON.stringify(values), }); - router.push("/"); // Redirect to home page after successful registration + router.push("/iiits"); // Redirect to home page after successful registration } catch (error) { console.error(error); toast({ From 5f69caf4767ac384d17f18791a48b709900082e9 Mon Sep 17 00:00:00 2001 From: virinci Date: Thu, 5 Dec 2024 10:14:46 +0530 Subject: [PATCH 3/3] Hardcode org name in sidebar --- components/app-sidebar.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/app-sidebar.tsx b/components/app-sidebar.tsx index 886d1f7..8f13a93 100644 --- a/components/app-sidebar.tsx +++ b/components/app-sidebar.tsx @@ -106,9 +106,9 @@ const defaultUser = { const defaultTeams = { teams: [ { - name: "Acme Inc", + name: "IIIT Sri City", logo: GalleryVerticalEnd, - nameId: "acme", + nameId: "iiits", role: "owner", }, {