fix: import logo as asset instead of hardcoded /src path

This commit is contained in:
2026-05-12 15:00:44 +08:00
parent 48118cad40
commit 6fdcc7f6ec
2 changed files with 4 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
import { Button, Box, Center, Stack, Text, Title } from '@mantine/core'
import { Link, createFileRoute } from '@tanstack/react-router'
import { TbLogin } from 'react-icons/tb'
import logoUrl from '../../logo.svg'
export const Route = createFileRoute('/')({
component: HomePage,
@@ -32,7 +33,7 @@ function HomePage() {
<Center mih="100vh" style={{ position: 'relative', zIndex: 1 }}>
<Stack align="center" gap="xl">
<img
src="/src/logo.svg"
src={logoUrl}
width={72}
height={72}
alt="logo"

View File

@@ -1,4 +1,5 @@
import { useLogin } from '@/frontend/hooks/useAuth'
import logoUrl from '../../logo.svg'
import {
Alert,
Box,
@@ -102,7 +103,7 @@ function LoginPage() {
{/* header */}
<Stack gap={8} align="center" mb={4}>
<img
src="/src/logo.svg"
src={logoUrl}
width={56}
height={56}
alt="logo"