Skip to content

Commit

Permalink
Merge pull request #35 from BU-Spark/admin-test
Browse files Browse the repository at this point in the history
fix: routing issue
  • Loading branch information
jidalii authored Dec 17, 2024
2 parents a25d96c + 46f6aa7 commit edadb9d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
8 changes: 8 additions & 0 deletions bu_arts_admin/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ const App: React.FC = () => {
<Sidebar></Sidebar>
<main className="flex-grow container max-w-full p-6 h-screen overflow-y-auto">
<Routes>
<Route
path="/"
element={
<SignedIn>
<Dashboard />
</SignedIn>
}
/>
<Route
path="/dashboard"
element={
Expand Down
2 changes: 1 addition & 1 deletion bu_arts_admin/src/components/sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const Sidebar: React.FC = () => {
{/* User Profile */}
<div className="mt-auto w-full">
<SignedOut>
<SignInButton>
<SignInButton fallbackRedirectUrl="/dashboard">
<button className="w-full px-4 py-2 bg-white text-red-800 rounded hover:bg-gray-200 transition">
Sign In
</button>
Expand Down
5 changes: 4 additions & 1 deletion bu_arts_admin/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ if (!PUBLISHABLE_KEY) {

ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<ClerkProvider publishableKey={PUBLISHABLE_KEY} afterSignOutUrl="/dashboard">
<ClerkProvider
publishableKey={PUBLISHABLE_KEY}
afterSignOutUrl="/dashboard"
>
<App />
</ClerkProvider>
</React.StrictMode>,
Expand Down

0 comments on commit edadb9d

Please sign in to comment.