Skip to content

Commit

Permalink
fix: 🐛 spoiler tags and event boost cards display
Browse files Browse the repository at this point in the history
  • Loading branch information
candela97 authored and dnaroma committed Oct 29, 2023
1 parent 296329c commit 9dc2377
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/pages/card/AgendaView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const AgendaView: React.FC<{ data?: ICardInfo }> = ({ data }) => {
<Grid item xs={6} md={7}>
<Grid container direction="column" spacing={1}>
<Grid item>
<SpoilerTag releaseTime={new Date(data.releaseAt)} />
<SpoilerTag releaseTime={new Date(data.releaseAt ?? data.archivePublishedAt)} />
</Grid>
<Grid item>
<ContentTrans
Expand Down
2 changes: 1 addition & 1 deletion src/pages/card/ComfyView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const ComfyView: React.FC<{ data?: ICardInfo }> = ({ data }) => {
<Grid container direction="column" rowSpacing={0.5}>
<Grid item>
<Grid container justifyContent="center">
<SpoilerTag releaseTime={new Date(data.releaseAt)} />
<SpoilerTag releaseTime={new Date(data.releaseAt ?? data.archivePublishedAt)} />
</Grid>
</Grid>
<Grid item>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/card/GridView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const GridView: React.FC<{ data?: ICardInfo }> = ({ data }) => {
top: "1%",
left: "1%",
}}
releaseTime={new Date(data.releaseAt)}
releaseTime={new Date(data.releaseAt ?? data.archivePublishedAt)}
/>
</CardMedia>
<CardContent style={{ paddingBottom: "16px" }}>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/event/EventDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ const EventDetail: React.FC<{}> = observer(() => {
Number(eventId) >= 36 ? (Number(eventId) >= 54 ? 2 : 1) : 0;
setBoostCards(() => {
let result = cards
.filter((elem) => elem.releaseAt <= ev!.aggregateAt)
.filter((elem) => (elem.releaseAt ?? elem.archivePublishedAt) <= ev!.aggregateAt)
.map((card) => {
let eventCard = ec.find(
(it) => it.cardId === card.id && it.bonusRate !== undefined
Expand Down
2 changes: 1 addition & 1 deletion src/pages/storyreader/StoryReader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ const StoryReader: React.FC<{}> = observer(() => {
const filteredCards = cards.filter(
(card) =>
card.characterId === Number(charaId) &&
(isShowSpoiler || card.releaseAt <= new Date().getTime())
(isShowSpoiler || (card.releaseAt ?? card.archivePublishedAt) <= new Date().getTime())
);
if (filteredCards.length) {
return (
Expand Down

0 comments on commit 9dc2377

Please sign in to comment.