Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
greyluo committed May 7, 2024
1 parent fc035c1 commit f16a36e
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 21 deletions.
32 changes: 17 additions & 15 deletions frontend/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -40,28 +40,30 @@
<!--ProfileEdit /-->
</Route>

{#if $adminStatus}
{#if $adminStatus !== null}
<Route path="/profile/:id" let:params>
<Profile id={params.id}/>
</Route>
<Route path="/inductees" component={Inductees} />
<Route path="/outreach" component={Outreach} />

<Route path="/events/create">
<EventCreate />
</Route>
<Route path="/events/edit/:id" let:params>
<EventCreate idOfEventToEdit={params.id}/>
</Route>
<Route path="/events/rides/:id" let:params>
<EventRides id={params.id}/>
<Route path="/events/:id" let:params>
<EventDetail id={params.id}/>
</Route>
{#if $adminStatus}
<Route path="/inductees" component={Inductees} />
<Route path="/outreach" component={Outreach} />
<Route path="/events/create">
<EventCreate />
</Route>
<Route path="/events/edit/:id" let:params>
<EventCreate idOfEventToEdit={params.id}/>
</Route>
<Route path="/events/rides/:id" let:params>
<EventRides id={params.id}/>
</Route>
{/if}
{/if}


<Route path="/events/:id" let:params>
<EventDetail id={params.id}/>
</Route>

</div>
</Router>

Expand Down
4 changes: 2 additions & 2 deletions frontend/src/Components/Sidebar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</style>

<!--While getting admin status, load the other buttons first-->

<div class="sidebar">
<img src={logo} alt="HKN logo" />
<a href="/">Home Page</a>
Expand All @@ -58,7 +58,7 @@
<a href="/">Home Page</a>
<a href="/profile/self">Profile</a>

{#if adminStatus}
{#if $adminStatus}
<a href="/inductees">Inductees</a>
<a href="/outreach">Outreach</a>
{/if}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/Pages/Inductees.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ import Layout from "../Layout.svelte";

<Layout>

{#if adminStatus}
{#if $adminStatus}
<div style="padding-left:50px">
<h1 style="margin-left: 15px">Inductees</h1>
<div>
Expand Down Expand Up @@ -298,7 +298,7 @@ import Layout from "../Layout.svelte";
<h1 style="margin-left: 15px">Loading</h1>
{/if}
</div>
{:else if adminStatus == null}
{:else if $adminStatus == null}
<div>
<h1 style="margin-left: 15px"> Loading...</h1>
</div>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/Pages/Outreach.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
</svelte:head>
<Layout>
<main>
{#if adminStatus}
{#if $adminStatus}
<div style="padding-left:50px">
<h1 style="margin-left: 15px">Outreach Students</h1>
<div>
Expand Down Expand Up @@ -226,7 +226,7 @@
<h1 style="margin-left: 15px">Loading...</h1>
{/if}
</div>
{:else if adminStatus === null}
{:else if $adminStatus === null}
<div>
<h1 style="margin-left: 15px">Loading...</h1>
</div>
Expand Down

0 comments on commit f16a36e

Please sign in to comment.