diff --git a/next.config.ts b/next.config.ts index 8e82640..26e872b 100644 --- a/next.config.ts +++ b/next.config.ts @@ -19,6 +19,10 @@ const nextConfig: NextConfig = { protocol: 'https', hostname: 'p.eagate.573.jp', }, + { + protocol: 'https', + hostname: 'eacache.s.konaminet.jp', + }, ], }, experimental: { diff --git a/src/components/achievement/index.tsx b/src/components/achievement/index.tsx index 3b915b9..6516d54 100644 --- a/src/components/achievement/index.tsx +++ b/src/components/achievement/index.tsx @@ -1,13 +1,37 @@ +import Image from 'next/image' + import { Achievement } from '@/types/achievement' import { Shiny } from '../common/shiny' +const BaseURL = 'https://eacache.s.konaminet.jp/game/chase2jokers/ccj/images/ranking/title_icon/' +const Icons = [ + '01jan.png', + '02feb.png', + '03mar.png', + '04apr.png', + '05may.png', + '06jun.png', + '07jul.png', + '08aug.png', + '09sep.png', + '10oct.png', + '11nov.png', + '12dec.png', + 'tower.png', + 'preyo.png', + 'towerha.png', + 'kac2023.png', + 'towerkyu.png', + 'kac.png', + 'kacyo.png', +] + interface AchievementProps { achievement: Achievement | string } export const AchievementView = ({ achievement }: AchievementProps) => { - console.log(achievement) if (typeof achievement === 'string') { return (
@@ -16,7 +40,7 @@ export const AchievementView = ({ achievement }: AchievementProps) => { ) } - if (!achievement.markup) { + if (!achievement.markup || achievement.markup === achievement.title) { return (
{achievement.title} @@ -25,14 +49,40 @@ export const AchievementView = ({ achievement }: AchievementProps) => { } const color = (() => { - if (achievement.icon_last) return 'shily-rainbow' + if (achievement.icon_last) return 'shiny-rainbow' if (achievement.icon_first) return 'shiny-gold' return 'shiny-silver' })() return ( - -
+ +
+ {achievement.icon_first && ( + + )} + + {achievement.icon_last && ( + + )} +
) }