Rework to one helper function

This commit is contained in:
ernstmul
2025-03-13 11:47:48 +01:00
parent d39cb8c69e
commit 77f0077ad9
18 changed files with 60 additions and 74 deletions

View File

@@ -3,8 +3,7 @@
import { IsLoggedIn } from '$lib/components';
import { GITHUB_REPO_LINK, GITHUB_STARS } from '$lib/constants';
import type { NavLink } from './MainNav.svelte';
import { PUBLIC_APPWRITE_DASHBOARD } from '$env/static/public';
import { getUtmSourceForLink } from '$lib/utils/utm';
import { getAppwriteDashboardUrl } from '$lib/utils/dashboard';
export let open = false;
export let links: NavLink[];
@@ -19,10 +18,7 @@
<nav class="web-side-nav web-is-not-desktop" class:hidden={!open}>
<div class="web-side-nav-wrapper ps-4 pe-4">
<div class="flex items-center gap-2 px-4">
<a
href={`${PUBLIC_APPWRITE_DASHBOARD}/register?${getUtmSourceForLink()}`}
class="web-button is-secondary flex-1"
>
<a href={getAppwriteDashboardUrl('/register')} class="web-button is-secondary flex-1">
Sign up
</a>
<IsLoggedIn classes="flex-1" />