diff --git a/public/maps/eden.png b/public/maps/eden.png new file mode 100644 index 0000000..9056181 Binary files /dev/null and b/public/maps/eden.png differ diff --git a/public/maps/elysian-gangchon.png b/public/maps/elysian-gangchon.png new file mode 100644 index 0000000..7792815 Binary files /dev/null and b/public/maps/elysian-gangchon.png differ diff --git a/public/maps/gonjiam.png b/public/maps/gonjiam.png new file mode 100644 index 0000000..3a793bd Binary files /dev/null and b/public/maps/gonjiam.png differ diff --git a/public/maps/high1.png b/public/maps/high1.png new file mode 100644 index 0000000..2710474 Binary files /dev/null and b/public/maps/high1.png differ diff --git a/public/maps/jisan.png b/public/maps/jisan.png new file mode 100644 index 0000000..450d43a Binary files /dev/null and b/public/maps/jisan.png differ diff --git a/public/maps/muju.png b/public/maps/muju.png new file mode 100644 index 0000000..1457825 Binary files /dev/null and b/public/maps/muju.png differ diff --git a/public/maps/phoenix.png b/public/maps/phoenix.png new file mode 100644 index 0000000..95432cd Binary files /dev/null and b/public/maps/phoenix.png differ diff --git a/public/maps/vivaldipark.png b/public/maps/vivaldipark.png new file mode 100644 index 0000000..401bfb9 Binary files /dev/null and b/public/maps/vivaldipark.png differ diff --git a/public/maps/wellihilli.png b/public/maps/wellihilli.png new file mode 100644 index 0000000..ecd65b6 Binary files /dev/null and b/public/maps/wellihilli.png differ diff --git a/public/maps/yongpyong.png b/public/maps/yongpyong.png new file mode 100644 index 0000000..e58a951 Binary files /dev/null and b/public/maps/yongpyong.png differ diff --git a/src/entities/slope/model/model.d.ts b/src/entities/slope/model/model.d.ts index dd18ad4..337ccfd 100644 --- a/src/entities/slope/model/model.d.ts +++ b/src/entities/slope/model/model.d.ts @@ -35,7 +35,7 @@ export type SlopeResponse = { } export type ResortConstant = { - MapComponent: ComponentType; + MapComponent: ComponentType | StaticImageData; slopes: SlopeConstant[]; webcams: WebcamConstant[]; }; diff --git a/src/entities/slope/model/resorts/eden.tsx b/src/entities/slope/model/resorts/eden.tsx index 39a9c7a..8e03d71 100644 --- a/src/entities/slope/model/resorts/eden.tsx +++ b/src/entities/slope/model/resorts/eden.tsx @@ -1,9 +1,9 @@ 'use client'; +import MapImage from '@public/maps/eden.png'; import BasicSlopePath from '../image/eden/basic-slope-path'; import JupiterSlopePath from '../image/eden/jupiter-slope-path'; import MainSlopePath from '../image/eden/main-slope-path'; -import MapImage from '../image/eden/map'; import MercurySlopePath from '../image/eden/mercury-slope-path'; import SaturnSlopePath from '../image/eden/saturn-slope-path'; import UranusSlopePath from '../image/eden/uranus-slope-path'; diff --git a/src/entities/slope/model/resorts/elysian-gangchon.tsx b/src/entities/slope/model/resorts/elysian-gangchon.tsx index 33d1f94..5e221db 100644 --- a/src/entities/slope/model/resorts/elysian-gangchon.tsx +++ b/src/entities/slope/model/resorts/elysian-gangchon.tsx @@ -1,11 +1,11 @@ 'use client'; +import ElysianGangchonMap from '@public/maps/elysian-gangchon.png'; import DeerSlopPath from '../image/elysian-gangchon/deer-slop-path'; import DragonSlopPath from '../image/elysian-gangchon/dragon-slop-path'; import HorseSlopPath from '../image/elysian-gangchon/horse-slop-path'; import JaguarSlopPath from '../image/elysian-gangchon/jaguar-slop-path'; import LeopardSlopPath from '../image/elysian-gangchon/leopard-slop-path'; -import ElysianGangchonMap from '../image/elysian-gangchon/map'; import PandaSlopPath from '../image/elysian-gangchon/panda-slop-path'; import PegasusSlopPath from '../image/elysian-gangchon/pegasus-slop-path'; import PumaSlopPath from '../image/elysian-gangchon/puma-slop-path'; diff --git a/src/entities/slope/model/resorts/gonjiam.tsx b/src/entities/slope/model/resorts/gonjiam.tsx index 46c0e51..1411be0 100644 --- a/src/entities/slope/model/resorts/gonjiam.tsx +++ b/src/entities/slope/model/resorts/gonjiam.tsx @@ -1,10 +1,10 @@ 'use client'; +import GonjiamMap from '@public/maps/gonjiam.png'; import CNP1SlopPath from '../image/gonjiam/cnp1-slop-path'; import CNP2SlopPath from '../image/gonjiam/cnp2-slop-path'; import Gram1SlopPath from '../image/gonjiam/gram1-slop-path'; import Gram2SlopPath from '../image/gonjiam/gram2-slop-path'; -import GonjiamMap from '../image/gonjiam/map'; import ThinkyouBridgeSlopPath from '../image/gonjiam/thinkyou-bridge-slop'; import Thinkyou1SlopPath from '../image/gonjiam/thinkyou1-slop-path'; import Thinkyou2SlopPath from '../image/gonjiam/thinkyou2-slop-path'; diff --git a/src/entities/slope/model/resorts/high1.tsx b/src/entities/slope/model/resorts/high1.tsx index e54b49a..93aa680 100644 --- a/src/entities/slope/model/resorts/high1.tsx +++ b/src/entities/slope/model/resorts/high1.tsx @@ -1,5 +1,6 @@ 'use client'; +import High1Map from '@public/maps/high1.png'; import Apollo1SlopPath from '../image/high1/apollo1-slop-path'; import Apollo2SlopPath from '../image/high1/apollo2-slop-path'; import Apollo3SlopPath from '../image/high1/apollo3-slop-path'; @@ -10,7 +11,6 @@ import Athena3SlopPath from '../image/high1/athena3-slop-path'; import Hera1SlopPath from '../image/high1/hera1-slop-path'; import Hera2SlopPath from '../image/high1/hera2-slop-path'; import Hera3SlopPath from '../image/high1/hera3-slop-path'; -import High1Map from '../image/high1/map'; import Victoria1SlopPath from '../image/high1/victoria1-slop-path'; import Victoria2SlopPath from '../image/high1/victoria2-slop-path'; import Zeus1SlopPath from '../image/high1/zeus1-slop-path'; diff --git a/src/entities/slope/model/resorts/jisan.tsx b/src/entities/slope/model/resorts/jisan.tsx index b922c70..cafb1b4 100644 --- a/src/entities/slope/model/resorts/jisan.tsx +++ b/src/entities/slope/model/resorts/jisan.tsx @@ -1,9 +1,9 @@ 'use client'; +import MapImage from '@public/maps/jisan.png'; import BlueLiftPath from '../image/jisan/blue-lift-path'; import Lemon1Sub1LiftPath from '../image/jisan/lemon1-1-lift-path'; import Lemon1LiftPath from '../image/jisan/lemon1-lift-path'; -import MapImage from '../image/jisan/map'; import NewOrangeLiftPath from '../image/jisan/new-orange-lift-path'; import Orange2LiftPath from '../image/jisan/orange2-lift-path'; import Orange3LiftPath from '../image/jisan/orange3-lift-path'; diff --git a/src/entities/slope/model/resorts/muju.tsx b/src/entities/slope/model/resorts/muju.tsx index 34c1cf7..1b96377 100644 --- a/src/entities/slope/model/resorts/muju.tsx +++ b/src/entities/slope/model/resorts/muju.tsx @@ -1,5 +1,6 @@ 'use client'; +import MujuMap from '@public/maps/muju.png'; import AllegroPath from '../image/muju/allegro-path'; import CadenzaSlopePath from '../image/muju/cadenza-slope-path'; import ConnectionSlopePath from '../image/muju/connection-slope-path'; @@ -7,7 +8,6 @@ import EasternSlopePath from '../image/muju/eastern-slope-path'; import FlamingoPath from '../image/muju/flamingo-path'; import FreewayPath from '../image/muju/freeway-path'; import Freeway2Path from '../image/muju/freeway2-path'; -import MujuMap from '../image/muju/map'; import MinuetPath from '../image/muju/minuet-path'; import ModeratoPath from '../image/muju/moderato-path'; import MozartPath from '../image/muju/mozart-path'; diff --git a/src/entities/slope/model/resorts/phoenix.tsx b/src/entities/slope/model/resorts/phoenix.tsx index 5b2ff74..2044a10 100644 --- a/src/entities/slope/model/resorts/phoenix.tsx +++ b/src/entities/slope/model/resorts/phoenix.tsx @@ -1,5 +1,6 @@ 'use client'; +import MapImage from '@public/maps/phoenix.png'; import ChampionSlopePath from '../image/phoenix/champion-slope-path'; import DiggySlopePath from '../image/phoenix/diggy-slope-path'; import DukeSlopePath from '../image/phoenix/duke-slope-path'; @@ -8,7 +9,6 @@ import FantasySlopePath from '../image/phoenix/fantasy-slope-path'; import HawkSlope1Path from '../image/phoenix/hawk-slope1-path'; import HawkSlope2Path from '../image/phoenix/hawk-slope2-path'; import KiwiSlopePath from '../image/phoenix/kiwi-slope-path'; -import MapImage from '../image/phoenix/map'; import MogulSlopePath from '../image/phoenix/mogul-slope-path'; import PanoramaPath from '../image/phoenix/panorama-path'; import ParadisePath from '../image/phoenix/paradise-path'; diff --git a/src/entities/slope/model/resorts/vivaldipark.tsx b/src/entities/slope/model/resorts/vivaldipark.tsx index 494db3a..ee33637 100644 --- a/src/entities/slope/model/resorts/vivaldipark.tsx +++ b/src/entities/slope/model/resorts/vivaldipark.tsx @@ -1,12 +1,12 @@ 'use client'; +import VivaldiparkMap from '@public/maps/vivaldipark.png'; import BalladSlopPath from '../image/vivaldipark/ballad-slop-path'; import BluesSlopPath from '../image/vivaldipark/blues-slop-path'; import ClassicSlopPath from '../image/vivaldipark/classic-slop-path'; import FunkySlopPath from '../image/vivaldipark/funky-slop-path'; import HiphopSlopPath from '../image/vivaldipark/hiphop-slop-path'; import JazzSlopPath from '../image/vivaldipark/jazz-slop-path'; -import VivaldiparkMap from '../image/vivaldipark/map'; import ReggaeSlopPath from '../image/vivaldipark/reggae-slop-path'; import RockSlopPath from '../image/vivaldipark/rock-slop-path'; import TechnoSlopPath from '../image/vivaldipark/techno-slop-path'; diff --git a/src/entities/slope/model/resorts/wellihilli.tsx b/src/entities/slope/model/resorts/wellihilli.tsx index 7a7dc7c..4088346 100644 --- a/src/entities/slope/model/resorts/wellihilli.tsx +++ b/src/entities/slope/model/resorts/wellihilli.tsx @@ -1,5 +1,6 @@ 'use client'; +import WellihilliMap from '@public/maps/wellihilli.png'; import AlphaSlope1Path from '../image/wellihilli/alpha-slope1-path'; import AlphaSlope2Path from '../image/wellihilli/alpha-slope2-path'; import AlphaSlope3Path from '../image/wellihilli/alpha-slope3-path'; @@ -18,7 +19,6 @@ import EchoSlope1Path from '../image/wellihilli/echo-slope1-path'; import EchoSlope2Path from '../image/wellihilli/echo-slope2-path'; import EchoSlope3Path from '../image/wellihilli/echo-slope3-path'; import HalfPipePath from '../image/wellihilli/half-pipe-path'; -import WellihilliMap from '../image/wellihilli/map'; import StarExpress1Path from '../image/wellihilli/star-express1-path'; import StarExpress2Path from '../image/wellihilli/star-express2-path'; import type { ResortConstant } from '../model'; diff --git a/src/entities/slope/model/resorts/yongpyong.tsx b/src/entities/slope/model/resorts/yongpyong.tsx index 7bce42b..47f00da 100644 --- a/src/entities/slope/model/resorts/yongpyong.tsx +++ b/src/entities/slope/model/resorts/yongpyong.tsx @@ -1,11 +1,11 @@ 'use client'; +import MapImage from '@public/maps/yongpyong.png'; import BlueSlopePath from '../image/yongpyong/blue-slope-path'; import DragonParkPath from '../image/yongpyong/dragon-park-path'; import GoldFantasticPath from '../image/yongpyong/gold-fantastic-path'; import GoldParadisePath from '../image/yongpyong/gold-paradise-path'; import GoldValleyPath from '../image/yongpyong/gold-valley-path'; -import MapImage from '../image/yongpyong/map'; import MegaGreenPath from '../image/yongpyong/mega-green-path'; import NewGoldSlopePath from '../image/yongpyong/new-gold-slope-path'; import NewRedSlopePath from '../image/yongpyong/new-red-slope-path'; diff --git a/src/features/slope/ui/slope-map.tsx b/src/features/slope/ui/slope-map.tsx index ae709f1..1c98c5b 100644 --- a/src/features/slope/ui/slope-map.tsx +++ b/src/features/slope/ui/slope-map.tsx @@ -1,4 +1,5 @@ import { animated } from '@react-spring/web'; +import Image, { type StaticImageData } from 'next/image'; import type { ComponentType } from 'react'; import React, { forwardRef } from 'react'; import type { Level } from '@/entities/slope/model'; @@ -8,7 +9,7 @@ import useSlopeStore from '../hooks/useSlopeStore'; interface SlopeMapProps { children?: React.ReactNode; - MapComponent: ComponentType; + MapComponent: ComponentType | StaticImageData; slopes: { id: string; @@ -29,14 +30,20 @@ const SlopeMap = forwardRef( - + {typeof MapComponent === 'object' ? ( + map + ) : ( + + )} {slopes.map((slope) => (