Skip to content

Commit

Permalink
for satire battle goals there are no official cards
Browse files Browse the repository at this point in the history
Show back battle goal backside instead
  • Loading branch information
signed committed Jan 15, 2023
1 parent 0b1d6bb commit caf78f9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Gallery.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import BattleGoalCard from 'battlegoals/BattleGoalCard'
import { BattleGoal, officialBattleGoals, satireGamingBattleGoals } from 'battlegoals/battleGoals'
import { BattleGoal, battleGoalImages, officialBattleGoals, satireGamingBattleGoals } from 'battlegoals/battleGoals'
import { css, NoProps, NoState } from 'lang/react'
import * as React from 'react'
import { CSSProperties } from 'react'
Expand Down Expand Up @@ -58,14 +58,12 @@ class Gallery extends React.Component<NoProps, NoState> {
}
const cards = allBattleGoals.map((it) => {
const nameInRepository = urlToScanFor(it)
const imgUrl = `https://raw.githubusercontent.com/any2cards/worldhaven/master/images/battle-goals/gloomhaven/gh-${nameInRepository}.png`
const battleCardGoalurl = `https://raw.githubusercontent.com/any2cards/worldhaven/master/images/battle-goals/gloomhaven/gh-${nameInRepository}.png`
const imgUrl = nameInRepository === 'empty' ? battleGoalImages.background : battleCardGoalurl
const style = css({
display: 'flex',
flexDirection: 'row',
})
if (nameInRepository === 'empty') {
return <div>Hello</div>
}
return (
<div style={style} key={it.globalCardId.asString()}>
<BattleGoalCard battleGoal={it} cardShadow={false} blurCard={false} />
Expand Down

0 comments on commit caf78f9

Please sign in to comment.