Skip to content

Commit

Permalink
fix: cycle tabs loading weirdness
Browse files Browse the repository at this point in the history
  • Loading branch information
aeolianeth committed Nov 27, 2024
1 parent 8f12477 commit ca5b82f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ type CyclesSubPanel = {
export const CyclesPayoutsPanel = () => {
const { fundingCycle } = useProjectContext()

const tabs: CyclesSubPanel[] = [
const tabs: CyclesSubPanel[] = fundingCycle ? [
// Don't show the current tab if there is no current cycle
fundingCycle?.number.gt(0) && { id: 'current', name: t`Current` },
fundingCycle.number.gt(0) && { id: 'current', name: t`Current` },
{ id: 'upcoming', name: t`Upcoming` },
{ id: 'history', name: t`History` },
].filter(Boolean) as CyclesSubPanel[]
].filter(Boolean) as CyclesSubPanel[] : []

return (
<Tab.Group as="div" className="mx-auto flex w-full flex-col gap-5">
Expand Down

0 comments on commit ca5b82f

Please sign in to comment.