fix: added BASE_URL support

This commit is contained in:
2022-11-23 23:10:51 +01:00
parent 69b1601d92
commit 49632f1e2c
15 changed files with 54 additions and 72 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
import { Link } from 'preact-router/match'
import { isAdministrator, User, UserRole } from '../../shared/model'
import { prependBaseUrl } from '../api'
const ROLE_LABEL: Record<UserRole, string> = {
['admin']: 'Admin',
@@ -15,7 +16,7 @@ type Props = {
export const Header = ({ user, noLogin }: Props) => (
<header>
<div class="logo">
<a href="/">PHC / Problemi</a>
<a href={prependBaseUrl('/')}>PHC / Problemi</a>
</div>
<nav>
{user ? (