From d1b1d36cbe2b276a99a7421101d31ea778235dbe Mon Sep 17 00:00:00 2001 From: Guryash Date: Wed, 25 Dec 2024 23:49:52 +1300 Subject: [PATCH 1/2] fix: strapi graphql max items --- strapi/config/plugins.js | 2 +- web/src/components/exec-page/PreviousTeamCard.tsx | 12 ++++++------ web/src/graphql/queries.ts | 2 +- web/src/screens/ExecScreen.tsx | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/strapi/config/plugins.js b/strapi/config/plugins.js index a1b04f8..5e79129 100644 --- a/strapi/config/plugins.js +++ b/strapi/config/plugins.js @@ -19,7 +19,7 @@ module.exports = ({ env }) => ({ shadowCRUD: true, playgroundAlways: false, depthLimit: 7, - amountLimit: 100, + amountLimit: 150, apolloServer: { tracing: false, }, diff --git a/web/src/components/exec-page/PreviousTeamCard.tsx b/web/src/components/exec-page/PreviousTeamCard.tsx index 8430e2e..ffa8915 100644 --- a/web/src/components/exec-page/PreviousTeamCard.tsx +++ b/web/src/components/exec-page/PreviousTeamCard.tsx @@ -15,14 +15,14 @@ export default function PreviousTeamCard({ return (
-

- {year} +

+ {year==="2024"? ("🥰") : ("")} {year} {year==="2024"? ("🥰") : ("")}

{teams.presidents.length > 0 && (
-

Presidents

+

President

{teams.presidents.map((team) => (

0 && (

Executives

-
+
{teams.executives.map((team) => (

{team.name}

diff --git a/web/src/graphql/queries.ts b/web/src/graphql/queries.ts index 8d6767a..624e6c7 100644 --- a/web/src/graphql/queries.ts +++ b/web/src/graphql/queries.ts @@ -125,7 +125,7 @@ export const GET_VALUES = gql` export const GET_PREVIOUS_TEAMS = gql` query { - previousTeams { + previousTeams(pagination: { limit: 300 }) { data { id attributes { diff --git a/web/src/screens/ExecScreen.tsx b/web/src/screens/ExecScreen.tsx index 8612bc8..9b25075 100644 --- a/web/src/screens/ExecScreen.tsx +++ b/web/src/screens/ExecScreen.tsx @@ -168,7 +168,7 @@ export default function ExecScreen({ navbar }: { navbar: JSX.Element }) { {errorPreviousTeams ? (
There are no previous teams to display
) : ( -
+
{sortedPreviousTeams.map((year) => ( Date: Wed, 25 Dec 2024 10:50:15 +0000 Subject: [PATCH 2/2] Format code with Prettier --- web/src/components/exec-page/PreviousTeamCard.tsx | 10 +++++----- web/src/screens/ExecScreen.tsx | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/web/src/components/exec-page/PreviousTeamCard.tsx b/web/src/components/exec-page/PreviousTeamCard.tsx index ffa8915..46dbd05 100644 --- a/web/src/components/exec-page/PreviousTeamCard.tsx +++ b/web/src/components/exec-page/PreviousTeamCard.tsx @@ -15,10 +15,10 @@ export default function PreviousTeamCard({ return (
-

- {year==="2024"? ("🥰") : ("")} {year} {year==="2024"? ("🥰") : ("")} +

+ {year === "2024" ? "🥰" : ""} {year} {year === "2024" ? "🥰" : ""}

{teams.presidents.length > 0 && (
@@ -38,11 +38,11 @@ export default function PreviousTeamCard({ {teams.executives.length > 0 && (

Executives

-
+
{teams.executives.map((team) => (

{team.name}

diff --git a/web/src/screens/ExecScreen.tsx b/web/src/screens/ExecScreen.tsx index 9b25075..652e9a0 100644 --- a/web/src/screens/ExecScreen.tsx +++ b/web/src/screens/ExecScreen.tsx @@ -168,7 +168,7 @@ export default function ExecScreen({ navbar }: { navbar: JSX.Element }) { {errorPreviousTeams ? (
There are no previous teams to display
) : ( -
+
{sortedPreviousTeams.map((year) => (