Skip to content

Commit f445a0f

Browse files
committed
fix: icon path
1 parent 4230d82 commit f445a0f

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

apps/front/src/components/common/Badge.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Box, Flex, Text } from '@devup-ui/react'
22

33
import { ICON_PATHS } from '@/components/icons/iconPaths'
4+
import { asset } from '@/lib/asset'
45
import type { AccidentCause, AccidentDamage } from '@/static/accidents'
56
import { CAUSE_LABELS, formatDamage } from '@/static/accidents'
67

@@ -44,7 +45,7 @@ export function Badge(props: BadgeProps) {
4445
<Box
4546
bg={color}
4647
boxSize="14px"
47-
maskImage={`url(${iconPath})`}
48+
maskImage={`url(${asset(iconPath)})`}
4849
maskPos="center"
4950
maskRepeat="no-repeat"
5051
maskSize="contain"

apps/front/src/components/icons/Icon.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { Box } from '@devup-ui/react'
22

3+
import { asset } from '@/lib/asset'
4+
35
export function Icon({
46
iconPath,
57
color = '$text',
@@ -16,7 +18,7 @@ export function Icon({
1618
bg={color}
1719
boxSize={boxSize}
1820
className={className}
19-
maskImage={`url(${iconPath})`}
21+
maskImage={`url(${asset(iconPath)})`}
2022
maskPos="center"
2123
maskRepeat="no-repeat"
2224
maskSize="contain"

0 commit comments

Comments
 (0)