Host public assets from AWS
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
/** @jsxImportSource theme-ui */
|
||||
import { Flex, Text } from '@theme-ui/components'
|
||||
import { useRouter } from 'next/router'
|
||||
import { assetsBucketBaseUrl } from '../../lib/consts'
|
||||
import { battlesuitFeatures } from '../../lib/honkai3rd/battlesuits'
|
||||
import { translate } from '../../lib/i18n'
|
||||
import SquareImageBox from './SquareImageBox'
|
||||
@@ -27,7 +28,7 @@ const BattlesuitFeatureLabel = ({ feature }: BattlesuitFeatureLabelProps) => {
|
||||
{featureData != null && (
|
||||
<SquareImageBox
|
||||
size={30}
|
||||
src={`/assets/honkai3rd/${icon}.png`}
|
||||
src={`${assetsBucketBaseUrl}/honkai3rd/${icon}.png`}
|
||||
alt={translatedLabel}
|
||||
mr={1}
|
||||
/>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/** @jsxImportSource theme-ui */
|
||||
import { assetsBucketBaseUrl } from '../../lib/consts'
|
||||
import SquareImageBox from './SquareImageBox'
|
||||
|
||||
interface BattlesuitRankIconProps {
|
||||
@@ -27,7 +28,7 @@ const BattlesuitRankIcon = ({
|
||||
return (
|
||||
<SquareImageBox
|
||||
size={size}
|
||||
src={`/assets/honkai3rd/rank-icons/${rank}-rank.png`}
|
||||
src={`${assetsBucketBaseUrl}/honkai3rd/rank-icons/${rank}-rank.png`}
|
||||
alt={`${rank} rank`}
|
||||
m={m}
|
||||
mx={mx}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/** @jsxImportSource theme-ui */
|
||||
import { useRouter } from 'next/router'
|
||||
import { Link, Text } from 'theme-ui'
|
||||
import { assetsBucketBaseUrl } from '../../lib/consts'
|
||||
import SquareImageBox from './SquareImageBox'
|
||||
|
||||
interface FilterButtonProps {
|
||||
@@ -40,7 +41,7 @@ const FilterButton = ({
|
||||
>
|
||||
{icon != null && (
|
||||
<SquareImageBox
|
||||
src={`/assets/honkai3rd/${icon}.png`}
|
||||
src={`${assetsBucketBaseUrl}/honkai3rd/${icon}.png`}
|
||||
alt={label}
|
||||
size={30}
|
||||
mr={1}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/** @jsxImportSource theme-ui */
|
||||
import { Box } from '@theme-ui/components'
|
||||
import Image from 'next/image'
|
||||
import { Box, Image } from '@theme-ui/components'
|
||||
|
||||
interface SquareImageBoxProps {
|
||||
size: number | string | Array<number | string>
|
||||
@@ -45,7 +44,7 @@ const SquareImageBox = ({
|
||||
flexShrink: 0,
|
||||
}}
|
||||
>
|
||||
<Image alt={alt} layout='fill' objectFit='cover' src={src} />
|
||||
<Image alt={alt} src={src} />
|
||||
</Box>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/** @jsxImportSource theme-ui */
|
||||
import { Flex, Text } from '@theme-ui/components'
|
||||
import { useRouter } from 'next/router'
|
||||
import { assetsBucketBaseUrl } from '../../lib/consts'
|
||||
import { battlesuitTypes } from '../../lib/honkai3rd/battlesuits'
|
||||
import { translate } from '../../lib/i18n'
|
||||
import { capitalize } from '../../lib/string'
|
||||
@@ -28,7 +29,7 @@ const TypeLabel = ({ type }: TypeLabelProps) => {
|
||||
{isValidType(type) && (
|
||||
<SquareImageBox
|
||||
size={30}
|
||||
src={`/assets/honkai3rd/type-icons/${type}.png`}
|
||||
src={`${assetsBucketBaseUrl}/honkai3rd/type-icons/${type}.png`}
|
||||
alt={label}
|
||||
mr={1}
|
||||
/>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/** @jsxImportSource theme-ui */
|
||||
import { Flex, Text } from '@theme-ui/components'
|
||||
import { useRouter } from 'next/router'
|
||||
import { assetsBucketBaseUrl } from '../../lib/consts'
|
||||
import { valkyries } from '../../lib/honkai3rd/battlesuits'
|
||||
import { translate } from '../../lib/i18n'
|
||||
import SquareImageBox from './SquareImageBox'
|
||||
@@ -22,7 +23,7 @@ const ValkyrieLabel = ({ valkyrie }: ValkyrieLabelProps) => {
|
||||
{icon && (
|
||||
<SquareImageBox
|
||||
size={30}
|
||||
src={`/assets/honkai3rd/${icon}.png`}
|
||||
src={`${assetsBucketBaseUrl}/honkai3rd/${icon}.png`}
|
||||
alt={translatedLabel}
|
||||
mr={1}
|
||||
/>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/** @jsxImportSource theme-ui */
|
||||
import { Box, Card, Text } from '@theme-ui/components'
|
||||
import { useRouter } from 'next/router'
|
||||
import { assetsBucketBaseUrl } from '../../lib/consts'
|
||||
import { BattlesuitData } from '../../lib/honkai3rd/battlesuits'
|
||||
import { translate } from '../../lib/i18n'
|
||||
import PageLink from '../atoms/PageLink'
|
||||
@@ -38,7 +39,7 @@ const BattlesuitCard = ({ battlesuit, hidden }: BattlesuitCardProps) => {
|
||||
>
|
||||
<SquareImageBox
|
||||
alt={battlesuitName}
|
||||
src={`/assets/honkai3rd/battlesuits/portrait-${battlesuit.id}.png`}
|
||||
src={`${assetsBucketBaseUrl}/honkai3rd/battlesuits/portrait-${battlesuit.id}.png`}
|
||||
size={100}
|
||||
/>
|
||||
<Box
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
import { Box, Card, Text } from '@theme-ui/components'
|
||||
import { useRouter } from 'next/router'
|
||||
import { assetsBucketBaseUrl } from '../../lib/consts'
|
||||
import { ElfData } from '../../lib/honkai3rd/elfs'
|
||||
import { translate } from '../../lib/i18n'
|
||||
import PageLink from '../atoms/PageLink'
|
||||
@@ -30,7 +31,7 @@ const ElfCard = ({ elf }: ElfCardProps) => {
|
||||
<PageLink href={`/honkai3rd/elfs/${elf.id}`}>
|
||||
<SquareImageBox
|
||||
alt={elfName}
|
||||
src={`/assets/honkai3rd/elfs/icon-${elf.id}.png`}
|
||||
src={`${assetsBucketBaseUrl}/honkai3rd/elfs/icon-${elf.id}.png`}
|
||||
size={[100]}
|
||||
/>
|
||||
<Box
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/** @jsxImportSource theme-ui */
|
||||
import { Box, Card, Text } from '@theme-ui/components'
|
||||
import { useRouter } from 'next/router'
|
||||
import { assetsBucketBaseUrl } from '../../lib/consts'
|
||||
import { StigmataData } from '../../lib/honkai3rd/stigmata'
|
||||
import { translate } from '../../lib/i18n'
|
||||
import PageLink from '../atoms/PageLink'
|
||||
@@ -29,7 +30,7 @@ const StigmataCard = ({ stigmata }: StigmataCardProps) => {
|
||||
<SquareImageBox
|
||||
size={[75, 100]}
|
||||
alt={stigmataName}
|
||||
src={`/assets/honkai3rd/stigmata/icon-${stigmata.id}.png`}
|
||||
src={`${assetsBucketBaseUrl}/honkai3rd/stigmata/icon-${stigmata.id}.png`}
|
||||
/>
|
||||
<Box
|
||||
sx={{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/** @jsxImportSource theme-ui */
|
||||
import { Box, Card, Flex, Text } from '@theme-ui/components'
|
||||
import { useRouter } from 'next/router'
|
||||
import { assetsBucketBaseUrl } from '../../lib/consts'
|
||||
import { StigmataSet } from '../../lib/honkai3rd/stigmata'
|
||||
import { translate } from '../../lib/i18n'
|
||||
import PageLink from '../atoms/PageLink'
|
||||
@@ -31,17 +32,17 @@ const StigmataSetCard = ({ stigmataSet }: StigmataSetCardProps) => {
|
||||
<SquareImageBox
|
||||
size={[80, 100]}
|
||||
alt={`${stigmataSet.id} Top`}
|
||||
src={`/assets/honkai3rd/stigmata/icon-${stigmataSet.id}-top.png`}
|
||||
src={`${assetsBucketBaseUrl}/honkai3rd/stigmata/icon-${stigmataSet.id}-top.png`}
|
||||
/>
|
||||
<SquareImageBox
|
||||
size={[80, 100]}
|
||||
alt={`${stigmataSet.id} Mid`}
|
||||
src={`/assets/honkai3rd/stigmata/icon-${stigmataSet.id}-mid.png`}
|
||||
src={`${assetsBucketBaseUrl}/honkai3rd/stigmata/icon-${stigmataSet.id}-mid.png`}
|
||||
/>
|
||||
<SquareImageBox
|
||||
size={[80, 100]}
|
||||
alt={`${stigmataSet.id} Bottom`}
|
||||
src={`/assets/honkai3rd/stigmata/icon-${stigmataSet.id}-bot.png`}
|
||||
src={`${assetsBucketBaseUrl}/honkai3rd/stigmata/icon-${stigmataSet.id}-bot.png`}
|
||||
/>
|
||||
</Flex>
|
||||
<Box
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/** @jsxImportSource theme-ui */
|
||||
import { Box, Card, Text } from '@theme-ui/components'
|
||||
import { useRouter } from 'next/router'
|
||||
import { assetsBucketBaseUrl } from '../../lib/consts'
|
||||
import { WeaponData } from '../../lib/honkai3rd/weapons'
|
||||
import { translate } from '../../lib/i18n'
|
||||
import PageLink from '../atoms/PageLink'
|
||||
@@ -31,7 +32,7 @@ const WeaponCard = ({ weapon, hidden }: WeaponCardProps) => {
|
||||
<SquareImageBox
|
||||
size={100}
|
||||
alt={weaponName}
|
||||
src={`/assets/honkai3rd/weapons/${weapon.id}.png`}
|
||||
src={`${assetsBucketBaseUrl}/honkai3rd/weapons/${weapon.id}.png`}
|
||||
/>
|
||||
<Box
|
||||
sx={{
|
||||
|
||||
@@ -13,6 +13,7 @@ import {
|
||||
import NextLink from 'next/link'
|
||||
import { useRouter } from 'next/router'
|
||||
import { useCallback, useState } from 'react'
|
||||
import { assetsBucketBaseUrl } from '../../lib/consts'
|
||||
import { useTranslation } from '../../lib/i18n'
|
||||
import PageLink from '../atoms/PageLink'
|
||||
import SquareImageBox from '../atoms/SquareImageBox'
|
||||
@@ -178,7 +179,7 @@ const NavItem = ({ target }: NavItemProps) => {
|
||||
<SquareImageBox
|
||||
size={20}
|
||||
mr={1}
|
||||
src={`/assets/honkai3rd/nav-icons/${target}.png`}
|
||||
src={`${assetsBucketBaseUrl}/honkai3rd/nav-icons/${target}.png`}
|
||||
/>
|
||||
<Text
|
||||
sx={{
|
||||
@@ -225,7 +226,7 @@ const Honkai3rdNavMobileItem = ({
|
||||
<SquareImageBox
|
||||
size={40}
|
||||
mr={1}
|
||||
src={`/assets/honkai3rd/nav-icons/${target}.png`}
|
||||
src={`${assetsBucketBaseUrl}/honkai3rd/nav-icons/${target}.png`}
|
||||
/>
|
||||
<Text
|
||||
sx={{
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
/** @jsxImportSource theme-ui */
|
||||
import { StigmataData, StigmataSet } from '../../lib/honkai3rd/stigmata'
|
||||
import Image from 'next/image'
|
||||
import { Box, Heading, Paragraph, Card, Flex } from '@theme-ui/components'
|
||||
import {
|
||||
Box,
|
||||
Heading,
|
||||
Paragraph,
|
||||
Card,
|
||||
Flex,
|
||||
Image,
|
||||
} from '@theme-ui/components'
|
||||
import PageLink from '../../components/atoms/PageLink'
|
||||
import StigmataCard from '../../components/molecules/StigmataCard'
|
||||
import Breadcrumb from '../../components/organisms/Breadcrumb'
|
||||
@@ -10,6 +16,7 @@ import SecondaryLabel from '../atoms/SecondaryLabel'
|
||||
import { useRouter } from 'next/router'
|
||||
import { translate, useTranslation } from '../../lib/i18n'
|
||||
import Head from '../atoms/Head'
|
||||
import { assetsBucketBaseUrl } from '../../lib/consts'
|
||||
|
||||
export interface SingleStigmataPageProps {
|
||||
type: 'single'
|
||||
@@ -82,10 +89,9 @@ const SingleStigmataPage = ({
|
||||
>
|
||||
<Image
|
||||
alt={stigmataName}
|
||||
src={`/assets/honkai3rd/stigmata/${stigmataData.id}.png`}
|
||||
src={`${assetsBucketBaseUrl}/honkai3rd/stigmata/${stigmataData.id}.png`}
|
||||
width={400}
|
||||
height={400}
|
||||
layout='responsive'
|
||||
/>
|
||||
</Box>
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
export const assetsBucketBaseUrl =
|
||||
process.env.NEXT_PUBLIC_ASSETS_BUCKET_BASE_URL
|
||||
@@ -1,7 +1,14 @@
|
||||
/** @jsxImportSource theme-ui */
|
||||
import { Box, Card, Flex, Heading, Paragraph, Text } from '@theme-ui/components'
|
||||
import {
|
||||
Box,
|
||||
Card,
|
||||
Flex,
|
||||
Heading,
|
||||
Paragraph,
|
||||
Text,
|
||||
Image,
|
||||
} from '@theme-ui/components'
|
||||
import { NextPageContext } from 'next'
|
||||
import Image from 'next/image'
|
||||
import React from 'react'
|
||||
import BattlesuitFeatureLabel from '../../../components/atoms/BattlesuitFeatureLabel'
|
||||
import BattlesuitRankIcon from '../../../components/atoms/BattlesuitRankIcon'
|
||||
@@ -27,6 +34,7 @@ import { translate, useTranslation } from '../../../lib/i18n'
|
||||
import { useRouter } from 'next/router'
|
||||
import Head from '../../../components/atoms/Head'
|
||||
import { capitalize } from '../../../lib/string'
|
||||
import { assetsBucketBaseUrl } from '../../../lib/consts'
|
||||
|
||||
interface BattlesuitShowPageProps {
|
||||
battlesuit: BattlesuitData
|
||||
@@ -112,10 +120,9 @@ const BattlesuitShowPage = ({ battlesuit }: BattlesuitShowPageProps) => {
|
||||
>
|
||||
<Image
|
||||
alt={battlesuitName}
|
||||
src={`/assets/honkai3rd/battlesuits/${battlesuit.id}.png`}
|
||||
src={`${assetsBucketBaseUrl}/honkai3rd/battlesuits/${battlesuit.id}.png`}
|
||||
width={400}
|
||||
height={400}
|
||||
layout='responsive'
|
||||
/>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
/** @jsxImportSource theme-ui */
|
||||
import { Box, Card, Flex, Heading, Paragraph } from '@theme-ui/components'
|
||||
import {
|
||||
Box,
|
||||
Card,
|
||||
Flex,
|
||||
Heading,
|
||||
Paragraph,
|
||||
Image,
|
||||
} from '@theme-ui/components'
|
||||
import { NextPageContext } from 'next'
|
||||
import Image from 'next/image'
|
||||
import React from 'react'
|
||||
import BattlesuitFeatureLabel from '../../../components/atoms/BattlesuitFeatureLabel'
|
||||
import SecondaryLabel from '../../../components/atoms/SecondaryLabel'
|
||||
@@ -14,6 +20,7 @@ import { translate, useTranslation } from '../../../lib/i18n'
|
||||
import { useRouter } from 'next/router'
|
||||
import Head from '../../../components/atoms/Head'
|
||||
import { battlesuitFeatures } from '../../../lib/honkai3rd/battlesuits'
|
||||
import { assetsBucketBaseUrl } from '../../../lib/consts'
|
||||
|
||||
interface ElfShowPageProps {
|
||||
elf: ElfData
|
||||
@@ -76,9 +83,7 @@ const ElfShowPage = ({ elf }: ElfShowPageProps) => {
|
||||
>
|
||||
<Image
|
||||
alt={elf.name}
|
||||
layout='fill'
|
||||
objectFit='cover'
|
||||
src={`/assets/honkai3rd/elfs/${elf.id}.png`}
|
||||
src={`${assetsBucketBaseUrl}/honkai3rd/elfs/${elf.id}.png`}
|
||||
/>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
@@ -11,6 +11,7 @@ import SquareImageBox from '../../components/atoms/SquareImageBox'
|
||||
import { mdiGithub } from '@mdi/js'
|
||||
import { Icon } from '@mdi/react'
|
||||
import Head from '../../components/atoms/Head'
|
||||
import { assetsBucketBaseUrl } from '../../lib/consts'
|
||||
|
||||
const bannerValkyries = [
|
||||
'kiana',
|
||||
@@ -119,7 +120,7 @@ const NavItem = ({ target }: NavItemProps) => {
|
||||
<SquareImageBox
|
||||
size={40}
|
||||
mr={1}
|
||||
src={`/assets/honkai3rd/nav-icons/${target}.png`}
|
||||
src={`${assetsBucketBaseUrl}/honkai3rd/nav-icons/${target}.png`}
|
||||
/>
|
||||
<Text sx={{ fontSize: 3 }}>{t(`nav.${target}`)}</Text>
|
||||
</Flex>
|
||||
@@ -151,7 +152,7 @@ const BannerItem = ({ valkyrie, active }: BannerItemProps) => {
|
||||
>
|
||||
<SquareImageBox
|
||||
size={280}
|
||||
src={`/assets/honkai3rd/banner-${valkyrie}.png`}
|
||||
src={`${assetsBucketBaseUrl}/honkai3rd/banner-${valkyrie}.png`}
|
||||
/>
|
||||
</Box>
|
||||
)
|
||||
|
||||
@@ -25,6 +25,7 @@ import { translate, useTranslation } from '../../../lib/i18n'
|
||||
import { useRouter } from 'next/router'
|
||||
import Head from '../../../components/atoms/Head'
|
||||
import PageLink from '../../../components/atoms/PageLink'
|
||||
import { assetsBucketBaseUrl } from '../../../lib/consts'
|
||||
|
||||
interface VersionShowPageProps {
|
||||
versionData: VersionData
|
||||
@@ -130,7 +131,7 @@ const VersionShowPage = ({
|
||||
<Flex sx={{ alignItems: 'center' }} mb={2}>
|
||||
<SquareImageBox
|
||||
size={40}
|
||||
src={`/assets/honkai3rd/battlesuits/portrait-${battlesuit.id}.png`}
|
||||
src={`${assetsBucketBaseUrl}/honkai3rd/battlesuits/portrait-${battlesuit.id}.png`}
|
||||
alt={`${battlesuitName}`}
|
||||
mr={2}
|
||||
/>
|
||||
@@ -162,7 +163,7 @@ const VersionShowPage = ({
|
||||
<Flex sx={{ alignItems: 'center' }} mb={2}>
|
||||
<SquareImageBox
|
||||
size={40}
|
||||
src={`/assets/honkai3rd/weapons/${weapon.id}.png`}
|
||||
src={`${assetsBucketBaseUrl}/honkai3rd/weapons/${weapon.id}.png`}
|
||||
alt={`${weaponName}`}
|
||||
mr={2}
|
||||
/>
|
||||
@@ -270,15 +271,15 @@ export async function getStaticPaths() {
|
||||
function getIconSrcFromItem(item: { type: string; id: string }): string | null {
|
||||
switch (item.type) {
|
||||
case 'battlesuit':
|
||||
return `/assets/honkai3rd/battlesuits/portrait-${item.id}.png`
|
||||
return `${assetsBucketBaseUrl}/honkai3rd/battlesuits/portrait-${item.id}.png`
|
||||
case 'weapon':
|
||||
return `/assets/honkai3rd/weapons/${item.id}.png`
|
||||
return `${assetsBucketBaseUrl}/honkai3rd/weapons/${item.id}.png`
|
||||
case 'stigmata':
|
||||
return `/assets/honkai3rd/stigmata/icon-${item.id}.png`
|
||||
return `${assetsBucketBaseUrl}/honkai3rd/stigmata/icon-${item.id}.png`
|
||||
case 'elf':
|
||||
return `/assets/honkai3rd/elfs/icon-${item.id}.png`
|
||||
return `${assetsBucketBaseUrl}/honkai3rd/elfs/icon-${item.id}.png`
|
||||
case 'outfit':
|
||||
return `/assets/honkai3rd/outfits/${item.id}.png`
|
||||
return `${assetsBucketBaseUrl}/honkai3rd/outfits/${item.id}.png`
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ import { useTranslation, translate } from '../../../lib/i18n'
|
||||
import { useRouter } from 'next/router'
|
||||
import Head from '../../../components/atoms/Head'
|
||||
import PageLink from '../../../components/atoms/PageLink'
|
||||
import { assetsBucketBaseUrl } from '../../../lib/consts'
|
||||
|
||||
interface VersionIndexPageProps {
|
||||
versionDataList: VersionData[]
|
||||
@@ -120,7 +121,7 @@ const VersionIndexPage = ({
|
||||
<Flex sx={{ alignItems: 'center' }} mb={2}>
|
||||
<SquareImageBox
|
||||
size={40}
|
||||
src={`/assets/honkai3rd/battlesuits/portrait-${battlesuit.id}.png`}
|
||||
src={`${assetsBucketBaseUrl}/honkai3rd/battlesuits/portrait-${battlesuit.id}.png`}
|
||||
alt={`${battlesuitName}`}
|
||||
mr={2}
|
||||
/>
|
||||
@@ -152,7 +153,7 @@ const VersionIndexPage = ({
|
||||
<Flex sx={{ alignItems: 'center' }} mb={2}>
|
||||
<SquareImageBox
|
||||
size={40}
|
||||
src={`/assets/honkai3rd/weapons/${weapon.id}.png`}
|
||||
src={`${assetsBucketBaseUrl}/honkai3rd/weapons/${weapon.id}.png`}
|
||||
alt={`${weaponName}`}
|
||||
mr={2}
|
||||
/>
|
||||
@@ -281,15 +282,15 @@ export default VersionIndexPage
|
||||
function getIconSrcFromItem(item: { type: string; id: string }): string | null {
|
||||
switch (item.type) {
|
||||
case 'battlesuit':
|
||||
return `/assets/honkai3rd/battlesuits/portrait-${item.id}.png`
|
||||
return `${assetsBucketBaseUrl}/honkai3rd/battlesuits/portrait-${item.id}.png`
|
||||
case 'weapon':
|
||||
return `/assets/honkai3rd/weapons/${item.id}.png`
|
||||
return `${assetsBucketBaseUrl}/honkai3rd/weapons/${item.id}.png`
|
||||
case 'stigmata':
|
||||
return `/assets/honkai3rd/stigmata/icon-${item.id}.png`
|
||||
return `${assetsBucketBaseUrl}/honkai3rd/stigmata/icon-${item.id}.png`
|
||||
case 'elf':
|
||||
return `/assets/honkai3rd/elfs/icon-${item.id}.png`
|
||||
return `${assetsBucketBaseUrl}/honkai3rd/elfs/icon-${item.id}.png`
|
||||
case 'outfit':
|
||||
return `/assets/honkai3rd/outfits/${item.id}.png`
|
||||
return `${assetsBucketBaseUrl}/honkai3rd/outfits/${item.id}.png`
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import { useRouter } from 'next/router'
|
||||
import { useTranslation, translate } from '../../../lib/i18n'
|
||||
import Head from '../../../components/atoms/Head'
|
||||
import PageLink from '../../../components/atoms/PageLink'
|
||||
import { assetsBucketBaseUrl } from '../../../lib/consts'
|
||||
|
||||
interface WeaponShowPageProps {
|
||||
weapon: WeaponData
|
||||
@@ -58,7 +59,7 @@ const WeaponShowPage = ({ weapon }: WeaponShowPageProps) => {
|
||||
<SquareImageBox
|
||||
size={100}
|
||||
alt={weaponName}
|
||||
src={`/assets/honkai3rd/weapons/${weapon.id}.png`}
|
||||
src={`${assetsBucketBaseUrl}/honkai3rd/weapons/${weapon.id}.png`}
|
||||
/>
|
||||
</Box>
|
||||
|
||||
|
||||
+1
-3
@@ -1,7 +1,6 @@
|
||||
/** @jsxImportSource theme-ui */
|
||||
import { Box, Text } from '@theme-ui/components'
|
||||
import { Box, Text, Image } from '@theme-ui/components'
|
||||
import PageLink from '../components/atoms/PageLink'
|
||||
import Image from 'next/image'
|
||||
import RootNavigator from '../components/organisms/RootNavigator'
|
||||
import Head from '../components/atoms/Head'
|
||||
|
||||
@@ -19,7 +18,6 @@ const IndexPage = () => {
|
||||
src='/assets/honkai3rd/wallpaper.png'
|
||||
width={640}
|
||||
height={360}
|
||||
layout='responsive'
|
||||
/>
|
||||
</Box>
|
||||
<Text sx={{ fontSize: 3 }}>Honkai 3rd</Text>
|
||||
|
||||
Reference in New Issue
Block a user