From 7f491b58b441b670e6dfab3beb0dfe97c9601fca Mon Sep 17 00:00:00 2001 From: xdkaine <55013938+xdkaine@users.noreply.github.com> Date: Tue, 17 Feb 2026 15:14:49 -0800 Subject: [PATCH 1/3] testing commit --- my-app/app/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/my-app/app/page.tsx b/my-app/app/page.tsx index dae5e97..132a1d6 100644 --- a/my-app/app/page.tsx +++ b/my-app/app/page.tsx @@ -56,7 +56,7 @@ export default function Page() { const pageHeader = (
Browse, deploy, and manage your own instance of our curated interactive From ca7796833f6cbd9d179b5106cdba32950451d84a Mon Sep 17 00:00:00 2001 From: xdkaine <55013938+xdkaine@users.noreply.github.com> Date: Tue, 17 Feb 2026 15:22:00 -0800 Subject: [PATCH 2/3] Revert "testing commit" This reverts commit 7f491b58b441b670e6dfab3beb0dfe97c9601fca. --- my-app/app/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/my-app/app/page.tsx b/my-app/app/page.tsx index 132a1d6..dae5e97 100644 --- a/my-app/app/page.tsx +++ b/my-app/app/page.tsx @@ -56,7 +56,7 @@ export default function Page() { const pageHeader = (
Browse, deploy, and manage your own instance of our curated interactive
From 7ffea5bdee5b8147a871a0358809aec8dfdeb719 Mon Sep 17 00:00:00 2001
From: xdkaine <55013938+xdkaine@users.noreply.github.com>
Date: Wed, 22 Apr 2026 15:29:15 -0700
Subject: [PATCH 3/3] fix to refetch and stop the cache of invalid/old
responses
---
my-app/app/admin/dashboard/page.tsx | 3 +++
my-app/app/creator/dashboard/page.tsx | 8 ++++++++
my-app/app/page.tsx | 1 +
my-app/app/pods/deployed/page.tsx | 3 +++
my-app/app/pods/templates/page.tsx | 5 ++++-
my-app/contexts/auth-context.tsx | 3 +++
my-app/hooks/use-api-state.ts | 7 ++++++-
my-app/lib/api.ts | 14 +++++++++++++-
8 files changed, 41 insertions(+), 3 deletions(-)
diff --git a/my-app/app/admin/dashboard/page.tsx b/my-app/app/admin/dashboard/page.tsx
index 384822e..6507245 100644
--- a/my-app/app/admin/dashboard/page.tsx
+++ b/my-app/app/admin/dashboard/page.tsx
@@ -12,11 +12,14 @@ import { NodeResources } from "@/app/admin/dashboard/node-resources"
import { DashboardQuickActions } from "@/components/dashboard/dashboard-quick-actions"
import { Button } from "@/components/ui/button"
import { RefreshCw } from "lucide-react"
+import { useAuth } from "@/contexts/auth-context"
export default function AdminDashboardPage() {
+ const { authState } = useAuth()
// Fetch unified dashboard data
const { data: dashboardData, loading, error, refetch } = useApiState({
fetchFn: getDashboardData,
+ enabled: authState.authenticated === true && authState.isAdmin === true,
deps: []
})
diff --git a/my-app/app/creator/dashboard/page.tsx b/my-app/app/creator/dashboard/page.tsx
index 4b195af..b0c80da 100644
--- a/my-app/app/creator/dashboard/page.tsx
+++ b/my-app/app/creator/dashboard/page.tsx
@@ -10,14 +10,21 @@ import { ErrorDisplay } from "@/components/ui/error-display";
import { Copy, CopyPlusIcon, Edit } from "lucide-react";
import Link from "next/link";
import { Button } from "@/components/ui/button";
+import { useAuth } from "@/contexts/auth-context";
export default function CreatorDashboardPage() {
+ const { authState } = useAuth();
+ const creatorOrAdmin =
+ authState.authenticated === true &&
+ (authState.isCreator === true || authState.isAdmin === true);
+
const {
data: templates,
loading: templatesLoading,
error: templatesError,
} = useApiState({
fetchFn: getAllPodTemplates,
+ enabled: creatorOrAdmin,
});
const {
@@ -26,6 +33,7 @@ export default function CreatorDashboardPage() {
error: unpublishedError,
} = useApiState({
fetchFn: getUnpublishedTemplates,
+ enabled: creatorOrAdmin,
});
const publishedCount = templates?.length || 0;
diff --git a/my-app/app/page.tsx b/my-app/app/page.tsx
index dae5e97..d32f3b2 100644
--- a/my-app/app/page.tsx
+++ b/my-app/app/page.tsx
@@ -42,6 +42,7 @@ export default function Page() {
error: dashboardError,
} = useApiState({
fetchFn: getUserDashboard,
+ enabled: authState.authenticated === true,
});
// Extract data from the unified response
diff --git a/my-app/app/pods/deployed/page.tsx b/my-app/app/pods/deployed/page.tsx
index 687354a..d3173af 100644
--- a/my-app/app/pods/deployed/page.tsx
+++ b/my-app/app/pods/deployed/page.tsx
@@ -10,6 +10,7 @@ import { useApiState } from "@/hooks/use-api-state"
import { deletePod, getDeployedPods } from "@/lib/api"
import { DeployedPod } from "@/lib/types"
import { SectionCards } from "@/app/pods/deployed/deployed-pods-cards"
+import { useAuth } from "@/contexts/auth-context"
import {
AlertDialog,
AlertDialogAction,
@@ -23,8 +24,10 @@ import {
export default function Page() {
const [alertOpen, setAlertOpen] = useState(false)
const [selectedPod, setSelectedPod] = useState