Skip to content

Commit db35965

Browse files
committed
Merge branch 'main' into feat/3938-bot-human-links
# Conflicts: # users/serializers.py
2 parents 70b47d4 + 04b5be5 commit db35965

File tree

31 files changed

+625
-387
lines changed

31 files changed

+625
-387
lines changed

front_end/package-lock.json

Lines changed: 105 additions & 76 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

front_end/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
"remark": "^15.0.1",
9595
"sass": "^1.77.6",
9696
"sharp": "^0.33.5",
97-
"storybook": "^9.0.13",
97+
"storybook": "^9.1.17",
9898
"strip-markdown": "^6.0.0",
9999
"stripe": "^17.7.0",
100100
"tailwind-merge": "^2.5.5",

front_end/src/app/(main)/(tournaments)/tournament/components/header_block_info.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ const HeaderBlockInfo: FC<Props> = async ({ tournament }) => {
2424
</Suspense>
2525
);
2626
case TournamentType.Index:
27-
return <IndexHeaderBlock tournament={tournament} />;
27+
return (
28+
<Suspense fallback={<Skeleton />}>
29+
<IndexHeaderBlock tournament={tournament}>
30+
<TournamentTimeline tournament={tournament} />
31+
</IndexHeaderBlock>
32+
</Suspense>
33+
);
2834
default:
2935
return (
3036
<div className="flex flex-wrap gap-x-9 gap-y-4 py-4">

front_end/src/app/(main)/(tournaments)/tournament/components/index/index_header_block.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"use client";
22

33
import { useTranslations } from "next-intl";
4-
import { useMemo, useState } from "react";
4+
import { ReactNode, useMemo, useState } from "react";
55

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

2727
type Props = {
2828
tournament: Tournament;
29+
children?: ReactNode;
2930
};
3031

31-
export default function IndexHeaderBlock({ tournament }: Props) {
32+
export default function IndexHeaderBlock({ tournament, children }: Props) {
3233
const t = useTranslations();
3334
const idx = tournament.index_data;
3435

@@ -134,6 +135,8 @@ export default function IndexHeaderBlock({ tournament }: Props) {
134135
max={idx?.max ?? null}
135136
/>
136137
)}
138+
139+
{children ? <div className="mt-4 sm:mt-5">{children}</div> : null}
137140
</div>
138141
</div>
139142
);

front_end/src/app/(main)/services/components/templates/services_page_template.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const ServicesPageTemplate: React.FC<Props> = async ({
8484
});
8585
const curated = all.filter(({ id, slug }) =>
8686
mainPageTournamentsList.some(
87-
({ id: want }) => want === slug || want === String(id)
87+
({ id: want }) => String(want) === slug || want === id
8888
)
8989
);
9090
tournamentsData = sortServiceTournaments(curated);

front_end/src/app/(main)/services/helpers.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ export function sortServiceTournaments(tournaments: TournamentPreview[]) {
66
const { tournamentsOrder } = ServiceConfig;
77
return tournaments.sort(
88
(a, b) =>
9-
(tournamentsOrder.find((t) => t.id === String(a.slug ?? a.id))?.order ??
10-
0) -
11-
(tournamentsOrder.find((t) => t.id === String(b.slug ?? b.id))?.order ??
12-
0)
9+
(tournamentsOrder.find((t) => t.id === a.id || String(t.id) === a.slug)
10+
?.order ?? 0) -
11+
(tournamentsOrder.find((t) => t.id === b.id || String(t.id) === b.slug)
12+
?.order ?? 0)
1313
);
1414
}
1515

front_end/src/app/(main)/services/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default async function ServicesPage() {
2525
]);
2626
const mainPageTournaments = tournaments.filter((tournament) =>
2727
mainPageTournamentsList.find(
28-
({ id }) => id === tournament.slug || id === String(tournament.id)
28+
({ id }) => String(id) === tournament.slug || id === tournament.id
2929
)
3030
);
3131
const sortedTournaments = sortServiceTournaments(mainPageTournaments);

front_end/src/app/(main)/services/serviceConfig.ts

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,41 @@ const ServiceConfig = {
1414
"placeholder-for-last-circle",
1515
],
1616
mainPageTournamentsList: [
17-
{ id: "bridgewater" },
18-
{ id: "keep-virginia-safe-ii" },
19-
{ id: "fiscal" },
20-
{ id: "climate" },
17+
// bridgewater
18+
{ id: 32567 },
19+
// keep-virginia-safe-ii
20+
{ id: 2100 },
21+
// fiscal
22+
{ id: 32725 },
23+
// climate
24+
{ id: 1756 },
2125
],
2226
// Use order to sort tournaments in the carousel/list
2327
tournamentsOrder: [
24-
{ id: "bridgewater", order: 1 },
25-
{ id: "keep-virginia-safe-ii", order: 2 },
26-
{ id: "respiratory-outlook-24-25", order: 3 },
27-
{ id: "fiscal", order: 4 },
28-
{ id: "climate", order: 5 },
29-
{ id: "biosecurity-tournament", order: 6 },
30-
{ id: "market-pulse", order: 7 },
31-
{ id: "flusight-challenge23-24", order: 8 },
32-
{ id: "global-pulse", order: 9 },
33-
{ id: "aibq2", order: 10 },
34-
{ id: "metaculus-cup", order: 11 },
35-
{ id: "ukraine-conflict", order: 12 },
28+
// bridgewater
29+
{ id: 32567, order: 1 },
30+
// keep-virginia-safe-ii
31+
{ id: 2100, order: 2 },
32+
// respiratory-outlook-24-25
33+
{ id: 3411, order: 3 },
34+
// fiscal
35+
{ id: 32725, order: 4 },
36+
// climate
37+
{ id: 1756, order: 5 },
38+
// biosecurity-tournament
39+
{ id: 1703, order: 6 },
40+
// market-pulse
41+
{ id: 32917, order: 7 },
42+
// flusight-challenge23-24
43+
{ id: 2569, order: 8 },
44+
// global-pulse
45+
{ id: 2722, order: 9 },
46+
// aibq2
47+
{ id: 32721, order: 10 },
48+
// metaculus-cup
49+
{ id: 32828, order: 11 },
50+
// ukraine-conflict
51+
{ id: 1426, order: 12 },
3652
],
3753
spotlightTournamentId: "bridgewater",
3854
partnersLogos: [

front_end/src/app/(prediction-flow)/components/prediction_flow_post.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ const PredictionFlowPost: FC<Props> = ({ tournamentSlug }) => {
138138
<ForecastMaker
139139
post={detailedPost}
140140
onPredictionSubmit={onPredictionSubmit}
141-
disableResolveButtons={true}
142141
/>
143142
</div>
144143

front_end/src/components/forecast_maker/forecast_maker_group/forecast_maker_group_binary.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ type Props = {
8383
questions: QuestionWithNumericForecasts[];
8484
groupVariable: string;
8585
canPredict: boolean;
86-
canResolve: boolean;
8786
predictionMessage: ReactNode;
8887
onPredictionSubmit?: () => void;
8988
};

0 commit comments

Comments
 (0)