Skip to content

Commit

Permalink
Merge pull request #795 from MuckRock/allanlasser/issue794
Browse files Browse the repository at this point in the history
Only show guided tour to signed-in users
  • Loading branch information
allanlasser authored Oct 28, 2024
2 parents e542df2 + 1927d89 commit 268fde2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/components/onboarding/GuidedTour.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@

<script lang="ts">
import { onMount } from "svelte";
import { getCurrentUser } from "$lib/utils/permissions";
const user = getCurrentUser();
onMount(() => {
// do we have a tour?
Expand All @@ -74,7 +77,7 @@
const currentRoute = getRoute();
const history = getTourHistory();
const offerTour = history[currentRoute] ?? true;
if (offerTour) {
if ($user && offerTour) {
startTour();
}
}
Expand Down

0 comments on commit 268fde2

Please sign in to comment.