Skip to content

Commit

Permalink
Remove setTitle
Browse files Browse the repository at this point in the history
There is no page title that is shown to the user, so there's no point in
setting it.
  • Loading branch information
rudolfs committed Sep 10, 2024
1 parent 6cfd87f commit cb82dae
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions src/lib/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,30 +80,11 @@ async function navigate(
return;
}

setTitle(loadedRoute);
activeRouteStore.set(loadedRoute);
activeUnloadedRouteStore.set(newRoute);
isLoading.set(false);
}

function setTitle(loadedRoute: LoadedRoute) {
const title: string[] = [];

if (loadedRoute.resource === "booting") {
title.push("Radicle");
} else if (loadedRoute.resource === "home") {
title.push("Home");
title.push("Radicle");
} else if (loadedRoute.resource === "authenticationError") {
title.push("Authentication Error");
title.push("Radicle");
} else {
utils.unreachable(loadedRoute);
}

document.title = title.join(" · ");
}

export async function push(newRoute: Route): Promise<void> {
await navigate("push", newRoute);
}
Expand Down

0 comments on commit cb82dae

Please sign in to comment.