Skip to content

Commit

Permalink
Only show guided tour to signed-in users
Browse files Browse the repository at this point in the history
  • Loading branch information
allanlasser committed Oct 28, 2024
1 parent e542df2 commit 2b58178
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 @@ -14,11 +14,14 @@
import { driver, type Driver, type DriveStep, type Config } from "driver.js";
import { get } from "svelte/store";
import { getCurrentUser } from "$lib/utils/permissions";
import { StorageManager } from "$lib/utils/storage";
import { scripts } from "./scripts";
const storage = new StorageManager("guided-tour");
const user = getCurrentUser();
let driverObj: Driver;
const driverConfig: Config = {
Expand Down Expand Up @@ -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 2b58178

Please sign in to comment.