Skip to content

Commit 2a8877e

Browse files
committed
Add prefix
1 parent a0468a3 commit 2a8877e

File tree

5 files changed

+20
-12
lines changed

5 files changed

+20
-12
lines changed

apps/landing/src/app/page.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { CodeBoard } from '../components/CodeBoard'
44
import { Container } from '../components/Container'
55
import { Discord } from '../components/Discord'
66
import { Header } from '../components/Header'
7+
import { IMAGE_PREFIX } from '../constants'
78

89
export default function HomePage() {
910
return (
@@ -12,7 +13,7 @@ export default function HomePage() {
1213
<Box mt="150px">
1314
<VStack alignItems="center" gap="50px" maxW="800px" mx="auto">
1415
<VStack alignItems="center" gap="24px">
15-
<Image h="50px" src="/icon.svg" w="52px" />
16+
<Image h="50px" src={IMAGE_PREFIX + '/icon.svg'} w="52px" />
1617
<Text color="$title" textAlign="center" typography="h1">
1718
Lorem ipsum dolor sit amet,
1819
<br />
@@ -38,7 +39,7 @@ export default function HomePage() {
3839
<Text color="$base" typography="buttonL">
3940
Get started
4041
</Text>
41-
<Image boxSize="24px" src="/arrow.svg" />
42+
<Image boxSize="24px" src={IMAGE_PREFIX + '/arrow.svg'} />
4243
</Flex>
4344
</Flex>
4445
</VStack>
@@ -66,7 +67,7 @@ export default function HomePage() {
6667
p="24px"
6768
>
6869
<Flex px="8px">
69-
<Image boxSize="32px" src="/idea.svg" />
70+
<Image boxSize="32px" src={IMAGE_PREFIX + '/idea.svg'} />
7071
</Flex>
7172
<VStack flex="1 0 0" gap="10px">
7273
<Text color="$title" typography="h6">
@@ -85,7 +86,7 @@ export default function HomePage() {
8586
p="30px 24px"
8687
>
8788
<Flex px="8px">
88-
<Image boxSize="32px" src="/trophy.svg" />
89+
<Image boxSize="32px" src={IMAGE_PREFIX + '/trophy.svg'} />
8990
</Flex>
9091
<VStack flex="1 0 0" gap="10px">
9192
<Text color="$title" typography="h6">
@@ -107,7 +108,7 @@ export default function HomePage() {
107108
p="30px 24px"
108109
>
109110
<Flex px="8px">
110-
<Image boxSize="32px" src="/heart.svg" />
111+
<Image boxSize="32px" src={IMAGE_PREFIX + '/heart.svg'} />
111112
</Flex>
112113
<VStack flex="1 0 0" gap="10px">
113114
<Text color="$title" typography="h6">
@@ -127,7 +128,7 @@ export default function HomePage() {
127128
p="30px 24px"
128129
>
129130
<Flex px="8px">
130-
<Image boxSize="32px" src="/notice.svg" />
131+
<Image boxSize="32px" src={IMAGE_PREFIX + '/notice.svg'} />
131132
</Flex>
132133
<VStack flex="1 0 0" gap="10px">
133134
<Text color="$title" typography="h6">

apps/landing/src/components/Discord.tsx

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

3+
import { IMAGE_PREFIX } from '../constants'
4+
35
export function Discord() {
46
return (
57
<Center
@@ -29,7 +31,7 @@ export function Discord() {
2931
<Text color="#FFF" typography="buttonLbold">
3032
Join our Discord
3133
</Text>
32-
<Image boxSize="24px" src="/outlink.svg" />
34+
<Image boxSize="24px" src={IMAGE_PREFIX + '/outlink.svg'} />
3335
</Flex>
3436
</Flex>
3537
</VStack>

apps/landing/src/components/Footer.tsx

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

3+
import { IMAGE_PREFIX } from '../constants'
4+
35
export function Footer() {
46
return (
57
<VStack bg="$footerBg" gap="80px" p="60px 320px">
@@ -57,7 +59,7 @@ export function Footer() {
5759
</Flex>
5860
<Flex alignItems="flex-end" justifyContent="space-between">
5961
<Flex alignItems="flex-end">
60-
<Image alt="white-logo" src="/white-logo.svg" />
62+
<Image alt="white-logo" src={IMAGE_PREFIX + '/white-logo.svg'} />
6163
</Flex>
6264
<VStack alignItems="flex-end" gap="10px">
6365
<Text color="$footerText" textAlign="right" typography="small">

apps/landing/src/components/Header/index.tsx

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

3+
import { IMAGE_PREFIX } from '../../constants'
34
import { Container } from '../Container'
45

56
export function Header() {
@@ -16,7 +17,7 @@ export function Header() {
1617
px="40px"
1718
>
1819
<Flex alignItems="center" gap="16px">
19-
<Image h="42px" src="/logo.svg" />
20+
<Image h="42px" src={IMAGE_PREFIX + '/logo.svg'} />
2021
</Flex>
2122
<Flex alignItems="center" gap="10px">
2223
<Flex alignItems="center" px="24px">
@@ -31,13 +32,13 @@ export function Header() {
3132
</Flex>
3233
<Flex alignItems="center">
3334
<Flex alignItems="center" px="10px">
34-
<Image boxSize="24px" src="/github.svg" />
35+
<Image boxSize="24px" src={IMAGE_PREFIX + '/github.svg'} />
3536
</Flex>
3637
<Flex alignItems="center" px="10px">
37-
<Image boxSize="24px" src="/discord.svg" />
38+
<Image boxSize="24px" src={IMAGE_PREFIX + '/discord.svg'} />
3839
</Flex>
3940
<Flex alignItems="center" px="10px">
40-
<Image boxSize="24px" src="/light.svg" />
41+
<Image boxSize="24px" src={IMAGE_PREFIX + '/light.svg'} />
4142
</Flex>
4243
</Flex>
4344
</Flex>

apps/landing/src/constants.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export const IMAGE_PREFIX =
2+
process.env.NODE_ENV === 'production' ? '/devup-ui' : ''

0 commit comments

Comments
 (0)