File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 1414 "react" : " ^17.0.2" ,
1515 "react-dom" : " ^17.0.2" ,
1616 "react-router-dom" : " ^6.27.0" ,
17- "shadertoy-react" : " ^1.1.2" ,
18- "url" : " ^0.11.4"
17+ "shadertoy-react" : " ^1.1.2"
1918 },
2019 "devDependencies" : {
2120 "@monaco-editor/react" : " ^4.3.1" ,
Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ import PowerupSS from "@assets/PGAS24_PowerupSS.png";
66import WarningSS from "@assets/PGAS24_WarningSS.png" ;
77
88export default function PGASGame ( ) {
9+ function getImageUrl ( file : string ) {
10+ return new URL ( `${ file } ` , import . meta. url ) . href
11+ }
12+
913 return < div className = "relative grid place-items-center" >
1014 < article className = "my-4 p-2 w-full max-w-sm md:max-w-2xl" >
1115 < h1 className = "text-4xl" > PGAS-Game</ h1 >
@@ -35,10 +39,10 @@ export default function PGASGame(){
3539
3640 < h2 className = "text-xl" > Images</ h2 >
3741 < div className = "grid gap-1 grid-cols-1 md:grid-cols-2" >
38- < img src = { LevelsSS } alt = "LevelSS.png" />
39- < img src = { MainMenuSS } alt = "MainMenuSS.png" />
40- < img src = { PowerupSS } alt = "PowerupSS.png" />
41- < img src = { WarningSS } alt = "WarningSS.png" />
42+ < img src = { getImageUrl ( LevelsSS ) } alt = "LevelSS.png" />
43+ < img src = { getImageUrl ( MainMenuSS ) } alt = "MainMenuSS.png" />
44+ < img src = { getImageUrl ( PowerupSS ) } alt = "PowerupSS.png" />
45+ < img src = { getImageUrl ( WarningSS ) } alt = "WarningSS.png" />
4246 </ div >
4347 </ article >
4448 </ div >
You can’t perform that action at this time.
0 commit comments