Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update auth.tsx

Kiran K54a16e370c29
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/auth.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/auth.tsx
index 2ebc86a216..860f631f97 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/auth.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/auth.tsx
@@ -1,25 +1,18 @@
"use client";
import useWorkspace from "@/lib/swr/use-workspace";
-import useWorkspaces from "@/lib/swr/use-workspaces";
import LayoutLoader from "@/ui/layout/layout-loader";
-import { notFound, redirect } from "next/navigation";
+import { notFound } from "next/navigation";
import { ReactNode } from "react";
export default function WorkspaceAuth({ children }: { children: ReactNode }) {
- const { loading: workspaceLoading, error } = useWorkspace();
- const { workspaces, loading: workspacesLoading } = useWorkspaces();
+ const { loading, error } = useWorkspace();
- if (workspaceLoading || workspacesLoading) {
+ if (loading) {
return <LayoutLoader />;
}
if (error && error.status === 404) {
- // If user has no workspaces, redirect to onboarding instead of showing 404
- // if (workspaces && workspaces.length === 0) {
- // redirect("/onboarding/welcome");
- // }
-
notFound();
}