From 357f0051a09c0977de9d67ea8c240721eec0f535 Mon Sep 17 00:00:00 2001 From: Aryan Kothari <87589047+thearyadev@users.noreply.github.com> Date: Wed, 28 Feb 2024 11:34:57 -0500 Subject: [PATCH] add disclaimer --- frontend/app/components/topmatter/topmatter.tsx | 6 +++++- frontend/app/season/[seasonNumber]/page.tsx | 5 +++-- frontend/app/utils/serverSideProps.ts | 6 ++++++ server.py | 4 ++++ 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/frontend/app/components/topmatter/topmatter.tsx b/frontend/app/components/topmatter/topmatter.tsx index fc6ab7d4..780256f3 100644 --- a/frontend/app/components/topmatter/topmatter.tsx +++ b/frontend/app/components/topmatter/topmatter.tsx @@ -1,4 +1,4 @@ -const TopMatter = ({ seasonNumber }: { seasonNumber: string }) => { +const TopMatter = ({ seasonNumber, disclaimer }: { seasonNumber: string, disclaimer?: string }) => { let indicator = ""; if (seasonNumber == "trends") { indicator = "Trends"; @@ -9,6 +9,10 @@ const TopMatter = ({ seasonNumber }: { seasonNumber: string }) => { return (
DISCLAIMER: {disclaimer}
) : undefined + }Welcome to Overwatch 2 Top 500 Aggregator
diff --git a/frontend/app/season/[seasonNumber]/page.tsx b/frontend/app/season/[seasonNumber]/page.tsx index 45c54ddd..9baadd28 100644 --- a/frontend/app/season/[seasonNumber]/page.tsx +++ b/frontend/app/season/[seasonNumber]/page.tsx @@ -1,6 +1,7 @@ import React from "react"; import { Card } from "@/app/components"; import { + fetchSeasonDisclaimer, fetchSeasonList, fetchSingleSeasonPageChartData, fetchSingleSeasonStdDevs, @@ -30,10 +31,10 @@ const SeasonPage = async ({ params }: { params: { seasonNumber: string } }) => { +params.seasonNumber, ); const seasonStdDevs = await fetchSingleSeasonStdDevs(+params.seasonNumber); - + const disclaimer = await fetchSeasonDisclaimer(+params.seasonNumber) ?? undefined return (