This repository has been archived by the owner on Jun 21, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use new card deck format for buildings
- Loading branch information
1 parent
c8db53c
commit 59e8ee3
Showing
6 changed files
with
47 additions
and
192 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
44 changes: 44 additions & 0 deletions
44
packages/frontend/src/Components/BuildingCardsDeck/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import React from "react"; | ||
|
||
import { | ||
Building, | ||
BuildingImage, | ||
} from "@ccss-support-manual/models"; | ||
|
||
import { CardDeck } from "../CardDeck"; | ||
import { Card, HoverEffect } from "../Card"; | ||
|
||
interface Props { | ||
buildings: Building[]; | ||
buildingsImages: BuildingImage[]; | ||
} | ||
|
||
export const BuildingCardsDeck = (props: Props) => { | ||
const { | ||
buildings, | ||
buildingsImages, | ||
} = props; | ||
return ( | ||
<CardDeck center> | ||
{buildings.map((building) => { | ||
const coverImages = buildingsImages.filter((image) => image.buildingName === building.internalName); | ||
return ( | ||
<Card | ||
hoverEffect={HoverEffect.Grayscale} | ||
className="shadow-sm" | ||
key={`building-card-${building.internalName}`} | ||
width="350px" | ||
img={coverImages.length > 0 ? `/${escape(coverImages[0].thumbnail.path)}` : "/img/300x200.png"} | ||
wrappedURL={`/buildings/${building.internalName}`} | ||
title={`${building.officialName}`} | ||
body={( | ||
<> | ||
<p className="m-0 pt-3">{building.officialName}</p> | ||
</> | ||
)} | ||
/> | ||
); | ||
})} | ||
</CardDeck> | ||
); | ||
}; |
62 changes: 0 additions & 62 deletions
62
packages/frontend/src/Components/BuildingCardsGrid/index.tsx
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
packages/frontend/src/Components/BuildingCardsGrid/style.scss
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters