Skip to content

Commit

Permalink
Merge pull request #459 from jsconfjp/refactor
Browse files Browse the repository at this point in the history
Tweak
  • Loading branch information
Leko authored Oct 15, 2024
2 parents 7ed4981 + 97b8bbd commit 73e93fe
Show file tree
Hide file tree
Showing 10 changed files with 197 additions and 218 deletions.
5 changes: 2 additions & 3 deletions 2024/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,13 @@ exports.createPages = ({ graphql, actions }) => {
descriptionJa
spokenLanguage
slideLanguage
slidesEn
slidesJa
slidesUrl
speakerIDs
sponsorIDs
date
startsAt
endsAt
room
track
youtube
}
}
Expand Down
14 changes: 7 additions & 7 deletions 2024/src/components/RoomLegend.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,22 @@ const Text = styled.span`
`

type RoomProps = {
room: Rooms
track: Rooms
}
export const Room = ({ room }: RoomProps) => {
export const Room = ({ track }: RoomProps) => {
const { t } = useTranslation()
return (
<RoomBox key={room}>
<Circle area={room} />
<Text>{t(`room${room}`)}</Text>
<RoomBox key={track}>
<Circle area={track} />
<Text>{t(`room${track}`)}</Text>
</RoomBox>
)
}

export const RoomLegend = () => (
<Box>
{rooms.map((room, i) => (
<Room key={i} room={room} />
{rooms.map((track, i) => (
<Room key={i} track={track} />
))}
</Box>
)
2 changes: 1 addition & 1 deletion 2024/src/components/Tags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function toArray<T>(input: T | T[]): T[] {
export const Tags = ({ children }: TagsProps) => {
const tags = toArray(children).filter(Boolean) as string[]
if (tags.length === 0) {
return <></>
return null
}
return (
<TagList>
Expand Down
Loading

0 comments on commit 73e93fe

Please sign in to comment.