Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ const HeaderBlockInfo: FC<Props> = async ({ tournament }) => {
</Suspense>
);
case TournamentType.Index:
return <IndexHeaderBlock tournament={tournament} />;
return (
<Suspense fallback={<Skeleton />}>
<IndexHeaderBlock tournament={tournament}>
<TournamentTimeline tournament={tournament} />
</IndexHeaderBlock>
</Suspense>
);
default:
return (
<div className="flex flex-wrap gap-x-9 gap-y-4 py-4">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { useTranslations } from "next-intl";
import { useMemo, useState } from "react";
import { ReactNode, useMemo, useState } from "react";

import FanChart from "@/components/charts/fan_chart";
import ButtonGroup, { GroupButton } from "@/components/ui/button_group";
Expand All @@ -26,9 +26,10 @@ type YearTab = "overview" | string;

type Props = {
tournament: Tournament;
children?: ReactNode;
};

export default function IndexHeaderBlock({ tournament }: Props) {
export default function IndexHeaderBlock({ tournament, children }: Props) {
const t = useTranslations();
const idx = tournament.index_data;

Expand Down Expand Up @@ -134,6 +135,8 @@ export default function IndexHeaderBlock({ tournament }: Props) {
max={idx?.max ?? null}
/>
)}

{children ? <div className="mt-4 sm:mt-5">{children}</div> : null}
</div>
</div>
);
Expand Down