Skip to content

Commit

Permalink
add coming soon
Browse files Browse the repository at this point in the history
  • Loading branch information
vipzero committed Jan 2, 2025
1 parent 4f0116f commit 2aab530
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions src/components/Home/AgeBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,27 @@ const divmod = (a: number, b: number) => [Math.floor(a / b), a % b]

export const AgeBar = ({ y, m }: { y: number; m: number }) => {
const [oy, my] = divmod(y, 10)
const comingSoon = y < 0

return (
<Style className="co-agebar co-panel" onClick={(e) => e.stopPropagation()}>
<p>
{y}
<span></span>
{m}
<span>ヶ月前</span>
{range(oy).map((i) => (
<progress className="ten" key={i} value={12} max={12} />
))}
{range(my).map((i) => (
<progress key={i} value={12} max={12} />
))}
<progress value={m} max={12} />
</p>
{comingSoon ? (
<span>放送予定</span>
) : (
<p>
{y}
<span></span>
{m}
<span>ヶ月前</span>
{range(oy).map((i) => (
<progress className="ten" key={i} value={12} max={12} />
))}
{range(my).map((i) => (
<progress key={i} value={12} max={12} />
))}
<progress value={m} max={12} />
</p>
)}
</Style>
)
}
Expand Down

0 comments on commit 2aab530

Please sign in to comment.