Skip to content

Commit

Permalink
Migrate to new image source api
Browse files Browse the repository at this point in the history
  • Loading branch information
Exidex committed Aug 4, 2024
1 parent 527e921 commit 690bfeb
Showing 1 changed file with 11 additions and 22 deletions.
33 changes: 11 additions & 22 deletions src/starwars-locations.tsx
Original file line number Diff line number Diff line change
@@ -1,46 +1,35 @@
import {ReactElement} from "react";
import {Grid} from "@project-gauntlet/api/components";
import {assetData} from "@project-gauntlet/api/helpers";
import { ReactElement } from "react";
import { Grid } from "@project-gauntlet/api/components";

export default function StarWarsLocations(): ReactElement {
const nabooImage = assetData("naboo.jpg");
const dagobahImage = assetData("dagobah.jpg");
const rylothImage = assetData("ryloth.jpg");
const tatooineImage = assetData("tatooine.jpg");
const deathstarImage = assetData("deathstar.jpg");
const endorImage = assetData("endor.jpg");
const coruscantImage = assetData("coruscant.jpg");
const dathomirImage = assetData("dathomir.jpg");
const dantooineImage = assetData("dantooine.jpg");

return (
<Grid>
<Grid.Item id="naboo" title="Naboo">
<Grid.Item.Content.Image source={{data: nabooImage}}/>
<Grid.Item.Content.Image source={{ asset: "naboo.jpg" }}/>
</Grid.Item>
<Grid.Item id="ryloth" title="Ryloth">
<Grid.Item.Content.Image source={{data: rylothImage}}/>
<Grid.Item.Content.Image source={{ asset: "dagobah.jpg" }}/>
</Grid.Item>
<Grid.Item id="tatooine" title="Tatooine">
<Grid.Item.Content.Image source={{data: tatooineImage}}/>
<Grid.Item.Content.Image source={{ asset: "ryloth.jpg" }}/>
</Grid.Item>
<Grid.Item id="dagobah" title="Dagobah">
<Grid.Item.Content.Image source={{data: dagobahImage}}/>
<Grid.Item.Content.Image source={{ asset: "tatooine.jpg" }}/>
</Grid.Item>
<Grid.Item id="coruscant" title="Coruscant">
<Grid.Item.Content.Image source={{data: coruscantImage}}/>
<Grid.Item.Content.Image source={{ asset: "deathstar.jpg" }}/>
</Grid.Item>
<Grid.Item id="endor" title="Endor">
<Grid.Item.Content.Image source={{data: endorImage}}/>
<Grid.Item.Content.Image source={{ asset: "endor.jpg" }}/>
</Grid.Item>
<Grid.Item id="deathstar" title="Death Star">
<Grid.Item.Content.Image source={{data: deathstarImage}}/>
<Grid.Item.Content.Image source={{ asset: "coruscant.jpg" }}/>
</Grid.Item>
<Grid.Item id="dathomir" title="Dathomir">
<Grid.Item.Content.Image source={{data: dathomirImage}}/>
<Grid.Item.Content.Image source={{ asset: "dathomir.jpg" }}/>
</Grid.Item>
<Grid.Item id="dantooine" title="Dantooine">
<Grid.Item.Content.Image source={{data: dantooineImage}}/>
<Grid.Item.Content.Image source={{ asset: "dantooine.jpg" }}/>
</Grid.Item>
</Grid>
)
Expand Down

0 comments on commit 690bfeb

Please sign in to comment.