Skip to content

Commit

Permalink
redirection
Browse files Browse the repository at this point in the history
  • Loading branch information
rakshitranga committed Apr 10, 2024
1 parent 30c9e32 commit 7c729c5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/routes/Home.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
import { liveQuery } from "dexie";
import { db } from "../lib/db";
// import { useHistory } from 'svelte-routing';
// import { goto } from '$app/navigation';
let profile = liveQuery(() => db.profile.toArray())
Expand Down Expand Up @@ -65,13 +67,13 @@
<button class="button bg-green mx-4 rounded-xl" on:click={updateStatistics}>Save Today's Activity</button>
{/if}
{/if}
<!-- {#if ($profile)}
{#if ($profile)}
{#if ($profile.length == 0)}
{location.href = "/profile"}
{this.$router.push('/profile')}
{:else}
{console.log("PROFILE EXISTS")}
{/if}
{/if} -->
{/if}
<NewGoal />
<MenuBar/>
</main>

0 comments on commit 7c729c5

Please sign in to comment.