changed dev and production base url
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<script>
|
||||
import { onMount, onDestroy } from 'svelte';
|
||||
import { applyAction, enhance } from '$app/forms';
|
||||
import { base } from '$app/paths';
|
||||
import { page } from '$app/stores';
|
||||
import { t } from 'svelte-i18n';
|
||||
import { writable } from 'svelte/store';
|
||||
@@ -80,11 +81,11 @@
|
||||
</div>
|
||||
<div class="header-right" class:mobile-menu-open={isMobileMenuOpen}>
|
||||
<div class="header-nav-item" class:active={$page.url.pathname === '/'}>
|
||||
<a href="/">home</a>
|
||||
<a href={`${base}/`}>home</a>
|
||||
</div>
|
||||
{#if !$page.data.user}
|
||||
<div class="header-nav-item" class:active={$page.url.pathname === '/auth/login'}>
|
||||
<a href="/auth/login">login</a>
|
||||
<div class="header-nav-item" class:active={$page.url.pathname === `${base}/auth/login`}>
|
||||
<a href={`${base}/auth/login`}>login</a>
|
||||
</div>
|
||||
<!-- <div
|
||||
class="header-nav-item"
|
||||
@@ -94,7 +95,7 @@
|
||||
</div> -->
|
||||
{:else}
|
||||
<div class="header-nav-item">
|
||||
<a href="/auth/about/{$page.data.user.id}">
|
||||
<a href={`${base}/auth/about/${$page.data.user.id}`}>
|
||||
<!-- <img
|
||||
src={$page.data.user.profile_picture ? $page.data.user.profile_picture : Avatar}
|
||||
alt={`${$page.data.user.first_name} ${$page.data.user.last_name}`}
|
||||
@@ -106,9 +107,9 @@
|
||||
{#if $page.data.user.role_id > 0}
|
||||
<div
|
||||
class="header-nav-item"
|
||||
class:active={$page.url.pathname.startsWith('/auth/admin/users')}
|
||||
class:active={$page.url.pathname.startsWith(`${base}/auth/admin/users`)}
|
||||
>
|
||||
<a href="/auth/admin/users">{$t('user.management')}</a>
|
||||
<a href={`${base}/auth/admin/users`}>{$t('user.management')}</a>
|
||||
</div>
|
||||
{/if}
|
||||
<!-- {#if $page.data.user.is_superuser}
|
||||
@@ -121,7 +122,7 @@
|
||||
{/if} -->
|
||||
<form
|
||||
class="header-nav-item"
|
||||
action="/auth/logout"
|
||||
action={`${base}/auth/logout`}
|
||||
method="POST"
|
||||
use:enhance={async () => {
|
||||
return async ({ result }) => {
|
||||
|
||||
Reference in New Issue
Block a user