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

View File

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