From ac0316f027a3f478823590aabce3022c1228e0f5 Mon Sep 17 00:00:00 2001 From: Nathan Curtis Date: Thu, 23 May 2024 11:13:01 -0700 Subject: [PATCH 01/12] [TM-786] Clear up some warnings in modal tests. --- src/context/modal.provider.test.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/context/modal.provider.test.tsx b/src/context/modal.provider.test.tsx index 95354fc2f..6ca8538a1 100644 --- a/src/context/modal.provider.test.tsx +++ b/src/context/modal.provider.test.tsx @@ -1,4 +1,5 @@ import { renderHook } from "@testing-library/react"; +import { act } from "react-dom/test-utils"; import { wait } from "@/utils/test-utils"; @@ -12,7 +13,7 @@ describe("Modal context provider", () => { wrapper: props => {props.children} }); - result.current.openModal(Modal); + act(() => result.current.openModal(Modal)); await wait(200); expect(result.current.modalOpen).toEqual(true); @@ -24,10 +25,10 @@ describe("Modal context provider", () => { wrapper: props => {props.children} }); - result.current.openModal(Modal); + act(() => result.current.openModal(Modal)); await wait(200); - result.current.closeModal(); + act(() => result.current.closeModal()); await wait(200); expect(result.current.modalOpen).toEqual(false); @@ -38,7 +39,7 @@ describe("Modal context provider", () => { wrapper: props => {props.children} }); - result.current.setModalContent(Modal); + act(() => result.current.setModalContent(Modal)); await wait(200); expect(result.current.modalContent).toEqual(Modal); From 4cd861f2d98b353f75ec14f072d2ebca39f78327 Mon Sep 17 00:00:00 2001 From: Nathan Curtis Date: Thu, 23 May 2024 11:15:49 -0700 Subject: [PATCH 02/12] [TM-786] Test against staging --- .jest/setEnvVars.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.jest/setEnvVars.js b/.jest/setEnvVars.js index f148eb1be..8d2b37bde 100644 --- a/.jest/setEnvVars.js +++ b/.jest/setEnvVars.js @@ -1,2 +1,2 @@ process.env.NODE_ENV = "test"; -process.env.NEXT_PUBLIC_API_BASE_URL = "https://test.wrirestorationmarketplace.cubeapis.com"; +process.env.NEXT_PUBLIC_API_BASE_URL = "https://new-wri-staging.wri-restoration-marketplace-api.com"; From 50612369ceabbdb94734b8f7c9b619aac3c808cb Mon Sep 17 00:00:00 2001 From: Nathan Curtis Date: Thu, 23 May 2024 11:20:48 -0700 Subject: [PATCH 03/12] [TM-786] Regenerate out of date snapshots --- .../__snapshots__/landTenure.test.ts.snap | 12 +++---- .../restorationInterventionTypes.test.ts.snap | 18 +++++----- .../options/__snapshots__/status.test.ts.snap | 4 --- .../sustainableDevelopmentGoals.test.ts.snap | 34 +++++++++---------- 4 files changed, 32 insertions(+), 36 deletions(-) diff --git a/src/constants/options/__snapshots__/landTenure.test.ts.snap b/src/constants/options/__snapshots__/landTenure.test.ts.snap index 9b813c2d1..b55686087 100644 --- a/src/constants/options/__snapshots__/landTenure.test.ts.snap +++ b/src/constants/options/__snapshots__/landTenure.test.ts.snap @@ -4,42 +4,42 @@ exports[`snapShot test getLandTenureOptions 1`] = ` [ { "meta": { - "image_url": "https://test.wrirestorationmarketplace.cubeapis.com/images/V2/land-tenures/public.png", + "image_url": "https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/land-tenures/public.png", }, "title": "Public", "value": "public", }, { "meta": { - "image_url": "https://test.wrirestorationmarketplace.cubeapis.com/images/V2/land-tenures/private.png", + "image_url": "https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/land-tenures/private.png", }, "title": "Private", "value": "private", }, { "meta": { - "image_url": "https://test.wrirestorationmarketplace.cubeapis.com/images/V2/land-tenures/indigenous.png", + "image_url": "https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/land-tenures/indigenous.png", }, "title": "Indigenous", "value": "indigenous", }, { "meta": { - "image_url": "https://test.wrirestorationmarketplace.cubeapis.com/images/V2/land-tenures/communal.png", + "image_url": "https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/land-tenures/communal.png", }, "title": "Communal", "value": "communal", }, { "meta": { - "image_url": "https://test.wrirestorationmarketplace.cubeapis.com/images/V2/land-tenures/national-protected-area.png", + "image_url": "https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/land-tenures/national-protected-area.png", }, "title": "National Protected Area", "value": "national-protected-area", }, { "meta": { - "image_url": "https://test.wrirestorationmarketplace.cubeapis.com/images/V2/land-tenures/other.png", + "image_url": "https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/land-tenures/other.png", }, "title": "Other", "value": "other", diff --git a/src/constants/options/__snapshots__/restorationInterventionTypes.test.ts.snap b/src/constants/options/__snapshots__/restorationInterventionTypes.test.ts.snap index e72ebdcc9..6fce06118 100644 --- a/src/constants/options/__snapshots__/restorationInterventionTypes.test.ts.snap +++ b/src/constants/options/__snapshots__/restorationInterventionTypes.test.ts.snap @@ -4,63 +4,63 @@ exports[`snapShot test getRestorationInterventionTypeOptions 1`] = ` [ { "meta": { - "image_url": "https://test.wrirestorationmarketplace.cubeapis.com/images/V2/restoration-methods/agroforestry@2x.png", + "image_url": "https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/restoration-methods/agroforestry@2x.png", }, "title": "Agroforestry", "value": "agroforestry", }, { "meta": { - "image_url": "https://test.wrirestorationmarketplace.cubeapis.com/images/V2/restoration-methods/applied_nucleation_tree_island@2x.png", + "image_url": "https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/restoration-methods/applied_nucleation_tree_island@2x.png", }, "title": "Applied Nucleation", "value": "applied-nucleation", }, { "meta": { - "image_url": "https://test.wrirestorationmarketplace.cubeapis.com/images/V2/restoration-methods/assisted_natural@2x.png", + "image_url": "https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/restoration-methods/assisted_natural@2x.png", }, "title": "Assisted Natural Regeneration", "value": "assisted-natural-regeneration", }, { "meta": { - "image_url": "https://test.wrirestorationmarketplace.cubeapis.com/images/V2/restoration-methods/direct_seeding@2x.png", + "image_url": "https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/restoration-methods/direct_seeding@2x.png", }, "title": "Direct Seeding", "value": "direct-seeding", }, { "meta": { - "image_url": "https://test.wrirestorationmarketplace.cubeapis.com/images/V2/restoration-methods/enrichment_planting@2x.png", + "image_url": "https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/restoration-methods/enrichment_planting@2x.png", }, "title": "Enrichment Planting", "value": "enrichment-planting", }, { "meta": { - "image_url": "https://test.wrirestorationmarketplace.cubeapis.com/images/V2/restoration-methods/mangrove@2x.png", + "image_url": "https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/restoration-methods/mangrove@2x.png", }, "title": "Mangrove Restoration", "value": "mangrove-restoration", }, { "meta": { - "image_url": "https://test.wrirestorationmarketplace.cubeapis.com/images/V2/restoration-methods/reforestation@2x.png", + "image_url": "https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/restoration-methods/reforestation@2x.png", }, "title": "Reforestation", "value": "reforestation", }, { "meta": { - "image_url": "https://test.wrirestorationmarketplace.cubeapis.com/images/V2/restoration-methods/riparian@2x.png", + "image_url": "https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/restoration-methods/riparian@2x.png", }, "title": "Riparian Restoration", "value": "riparian-restoration", }, { "meta": { - "image_url": "https://test.wrirestorationmarketplace.cubeapis.com/images/V2/restoration-methods/silvopasture@2x.png", + "image_url": "https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/restoration-methods/silvopasture@2x.png", }, "title": "Silvopasture", "value": "silvopasture", diff --git a/src/constants/options/__snapshots__/status.test.ts.snap b/src/constants/options/__snapshots__/status.test.ts.snap index 47df3e24e..af9d78dc5 100644 --- a/src/constants/options/__snapshots__/status.test.ts.snap +++ b/src/constants/options/__snapshots__/status.test.ts.snap @@ -6,10 +6,6 @@ exports[`snapShot getStatusOptions 1`] = ` "title": "Draft", "value": "started", }, - { - "title": "Rejected", - "value": "rejected", - }, { "title": "Approved", "value": "approved", diff --git a/src/constants/options/__snapshots__/sustainableDevelopmentGoals.test.ts.snap b/src/constants/options/__snapshots__/sustainableDevelopmentGoals.test.ts.snap index 73d313f82..4b737eee6 100644 --- a/src/constants/options/__snapshots__/sustainableDevelopmentGoals.test.ts.snap +++ b/src/constants/options/__snapshots__/sustainableDevelopmentGoals.test.ts.snap @@ -4,119 +4,119 @@ exports[`snapShot test sustainableDevelopmentGoalsOptions 1`] = ` [ { "meta": { - "image_url": "https://test.wrirestorationmarketplace.cubeapis.com/images/V2/sustainable-development-goals/no_poverty@2x.png", + "image_url": "https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/sustainable-development-goals/no_poverty@2x.png", }, "title": "No Poverty", "value": "no-poverty", }, { "meta": { - "image_url": "https://test.wrirestorationmarketplace.cubeapis.com/images/V2/sustainable-development-goals/zero_hunger@2x.png", + "image_url": "https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/sustainable-development-goals/zero_hunger@2x.png", }, "title": "Zero Hunger", "value": "zero-hunger", }, { "meta": { - "image_url": "https://test.wrirestorationmarketplace.cubeapis.com/images/V2/sustainable-development-goals/good-health-and-well-being@2x.png", + "image_url": "https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/sustainable-development-goals/good-health-and-well-being@2x.png", }, "title": "Good Health and Well-being", "value": "good-health-and-well-being", }, { "meta": { - "image_url": "https://test.wrirestorationmarketplace.cubeapis.com/images/V2/sustainable-development-goals/quality-education@2x.png", + "image_url": "https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/sustainable-development-goals/quality-education@2x.png", }, "title": "Quality Education", "value": "quality-education", }, { "meta": { - "image_url": "https://test.wrirestorationmarketplace.cubeapis.com/images/V2/sustainable-development-goals/gender-equality@2x.png", + "image_url": "https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/sustainable-development-goals/gender-equality@2x.png", }, "title": "Gender Equality", "value": "gender-equality", }, { "meta": { - "image_url": "https://test.wrirestorationmarketplace.cubeapis.com/images/V2/sustainable-development-goals/clean-water-and-sanitation@2x.png", + "image_url": "https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/sustainable-development-goals/clean-water-and-sanitation@2x.png", }, "title": "Clean Water and Sanitation", "value": "clean-water-and-sanitation", }, { "meta": { - "image_url": "https://test.wrirestorationmarketplace.cubeapis.com/images/V2/sustainable-development-goals/affordable-and-clean-energy@2x.png", + "image_url": "https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/sustainable-development-goals/affordable-and-clean-energy@2x.png", }, "title": "Affordable and Clean Energy", "value": "affordable-and-clean-energy", }, { "meta": { - "image_url": "https://test.wrirestorationmarketplace.cubeapis.com/images/V2/sustainable-development-goals/decent-work-and-economic-growth@2x.png", + "image_url": "https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/sustainable-development-goals/decent-work-and-economic-growth@2x.png", }, "title": "Decent Work and Economic Growth", "value": "decent-work-and-economic-growth", }, { "meta": { - "image_url": "https://test.wrirestorationmarketplace.cubeapis.com/images/V2/sustainable-development-goals/industry-innovation-and-infrastructure@2x.png", + "image_url": "https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/sustainable-development-goals/industry-innovation-and-infrastructure@2x.png", }, "title": "Industry, Innovation, and Infrastructure", "value": "industry-innovation-and-infrastructure", }, { "meta": { - "image_url": "https://test.wrirestorationmarketplace.cubeapis.com/images/V2/sustainable-development-goals/reduced-inequalities@2x.png", + "image_url": "https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/sustainable-development-goals/reduced-inequalities@2x.png", }, "title": "Reduced Inequalities", "value": "reduced-inequalities", }, { "meta": { - "image_url": "https://test.wrirestorationmarketplace.cubeapis.com/images/V2/sustainable-development-goals/sustainable-cities-and-communities@2x.png", + "image_url": "https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/sustainable-development-goals/sustainable-cities-and-communities@2x.png", }, "title": "Sustainable Cities and Communities", "value": "sustainable-cities-and-communities", }, { "meta": { - "image_url": "https://test.wrirestorationmarketplace.cubeapis.com/images/V2/sustainable-development-goals/responsible-consumption-and-production@2x.png", + "image_url": "https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/sustainable-development-goals/responsible-consumption-and-production@2x.png", }, "title": "Responsible Consumption and Production", "value": "responsible-consumption-and-production", }, { "meta": { - "image_url": "https://test.wrirestorationmarketplace.cubeapis.com/images/V2/sustainable-development-goals/climate-action@2x.png", + "image_url": "https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/sustainable-development-goals/climate-action@2x.png", }, "title": "Climate Action", "value": "climate-action", }, { "meta": { - "image_url": "https://test.wrirestorationmarketplace.cubeapis.com/images/V2/sustainable-development-goals/life-below-water@2x.png", + "image_url": "https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/sustainable-development-goals/life-below-water@2x.png", }, "title": "Life Below Water", "value": "life-below-water", }, { "meta": { - "image_url": "https://test.wrirestorationmarketplace.cubeapis.com/images/V2/sustainable-development-goals/life-on-land@2x.png", + "image_url": "https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/sustainable-development-goals/life-on-land@2x.png", }, "title": "Life on Land", "value": "life-on-land", }, { "meta": { - "image_url": "https://test.wrirestorationmarketplace.cubeapis.com/images/V2/sustainable-development-goals/peace-justice-and-strong-institutions@2x.png", + "image_url": "https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/sustainable-development-goals/peace-justice-and-strong-institutions@2x.png", }, "title": "Peace, Justice, and Strong Institutions", "value": "peace-justice-and-strong-institutions", }, { "meta": { - "image_url": "https://test.wrirestorationmarketplace.cubeapis.com/images/V2/sustainable-development-goals/partnerships-for-the-goals@2x.png", + "image_url": "https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/sustainable-development-goals/partnerships-for-the-goals@2x.png", }, "title": "Partnerships for the Goals", "value": "partnerships-for-the-goals", From 4e40da04f04c2315092925b6d0047790e224b9b4 Mon Sep 17 00:00:00 2001 From: Nathan Curtis Date: Thu, 23 May 2024 11:23:11 -0700 Subject: [PATCH 04/12] [TM-786] Update hook tests to match old code changes. --- src/hooks/useGetReportingWindow.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hooks/useGetReportingWindow.test.ts b/src/hooks/useGetReportingWindow.test.ts index 14386e83f..fc7bd1ebf 100644 --- a/src/hooks/useGetReportingWindow.test.ts +++ b/src/hooks/useGetReportingWindow.test.ts @@ -11,7 +11,7 @@ describe("Test useGetReportingWindow hook", () => { const { getReportingWindow } = useGetReportingWindow(); return getReportingWindow(due_date, "bi-annually"); }); - expect(result.current).toBe("November - April 2023"); + expect(result.current).toBe("October - March 2023"); }); test("Test `quarterly` window", () => { @@ -20,6 +20,6 @@ describe("Test useGetReportingWindow hook", () => { const { getReportingWindow } = useGetReportingWindow(); return getReportingWindow(due_date, "quarterly"); }); - expect(result.current).toBe("February - April 2023"); + expect(result.current).toBe("January - March 2023"); }); }); From 5c3c02dca132548b395e98b1a7408dac04d75436 Mon Sep 17 00:00:00 2001 From: Nathan Curtis Date: Thu, 23 May 2024 11:27:11 -0700 Subject: [PATCH 05/12] [TM-786] Add storyshots for the workday collapse grid storybook --- .../WorkdayCollapseGrid.stories.storyshot | 187 ++++++++++++++++++ 1 file changed, 187 insertions(+) create mode 100644 src/components/extensive/WorkdayCollapseGrid/__snapshots__/WorkdayCollapseGrid.stories.storyshot diff --git a/src/components/extensive/WorkdayCollapseGrid/__snapshots__/WorkdayCollapseGrid.stories.storyshot b/src/components/extensive/WorkdayCollapseGrid/__snapshots__/WorkdayCollapseGrid.stories.storyshot new file mode 100644 index 000000000..ea26ceea7 --- /dev/null +++ b/src/components/extensive/WorkdayCollapseGrid/__snapshots__/WorkdayCollapseGrid.stories.storyshot @@ -0,0 +1,187 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Storyshots Components/Extensive/WorkdayCollapse Complete Green 1`] = ` +
+
+ +
+
+`; + +exports[`Storyshots Components/Extensive/WorkdayCollapse Default 1`] = ` +
+
+ +
+
+`; + +exports[`Storyshots Components/Extensive/WorkdayCollapse In Progress Green 1`] = ` +
+
+ +
+
+`; + +exports[`Storyshots Components/Extensive/WorkdayCollapse Not Started Green 1`] = ` +
+
+ +
+
+`; + +exports[`Storyshots Components/Extensive/WorkdayCollapse Variant Narrow 1`] = ` +
+
+ +
+
+`; From 12a3e4a31e7dbc4932274cd9a3da0339bb4f5a04 Mon Sep 17 00:00:00 2001 From: Nathan Curtis Date: Thu, 23 May 2024 13:01:24 -0700 Subject: [PATCH 06/12] [TM-786] Regenerate storyshots --- .../FundingCard.stories.storyshot | 8 +- .../ImageGallery.stories.storyshot | 301 ++++++++++++++++-- .../BooleanInput.stories.storyshot | 2 + .../ConditionalInput.stories.tsx | 3 +- .../ConditionalInput.stories.storyshot | 2 + .../__snapshots__/Dropdown.stories.storyshot | 32 ++ .../LanguagesDropdown.stories.storyshot | 16 + .../RadioGroup.stories.storyshot | 2 + .../AlternatingSection.stories.storyshot | 4 +- .../SelectImageList.stories.storyshot | 20 +- .../__snapshots__/Table.stories.storyshot | 145 ++++++++- .../ApplicationsCard.stories.storyshot | 38 +-- .../PerPageSelector.stories.storyshot | 11 +- .../MainLayout.stories.storyshot | 59 +++- .../__snapshots__/Navbar.stories.storyshot | 118 ++++++- .../useGetCustomFormSteps.stories.storyshot | 39 ++- 16 files changed, 731 insertions(+), 69 deletions(-) diff --git a/src/components/elements/Cards/FundingCard/__snapshots__/FundingCard.stories.storyshot b/src/components/elements/Cards/FundingCard/__snapshots__/FundingCard.stories.storyshot index d64d5ab9f..5ea8b0618 100644 --- a/src/components/elements/Cards/FundingCard/__snapshots__/FundingCard.stories.storyshot +++ b/src/components/elements/Cards/FundingCard/__snapshots__/FundingCard.stories.storyshot @@ -41,7 +41,7 @@ exports[`Storyshots Components/Elements/Cards/FundingCard Default 1`] = ` Location:

London, United Kingdom @@ -54,10 +54,10 @@ exports[`Storyshots Components/Elements/Cards/FundingCard Default 1`] = ` The funding application is designed for restoration projects in Africa. This application provides an opportunity for project developers to seek financial support for their restoration initiatives across the African continent.

@@ -69,6 +77,14 @@ exports[`Storyshots Components/Elements/ImageGallery Default 1`] = `
+ @@ -144,11 +178,29 @@ exports[`Storyshots Components/Elements/ImageGallery Default 1`] = ` onMouseEnter={[Function]} onTouchStart={[Function]} target="_blank" - /> + > +
+
@@ -209,11 +261,29 @@ exports[`Storyshots Components/Elements/ImageGallery Default 1`] = ` onMouseEnter={[Function]} onTouchStart={[Function]} target="_blank" - /> + > +
+
@@ -264,6 +334,14 @@ exports[`Storyshots Components/Elements/ImageGallery Default 1`] = `
+
@@ -274,11 +352,29 @@ exports[`Storyshots Components/Elements/ImageGallery Default 1`] = ` onMouseEnter={[Function]} onTouchStart={[Function]} target="_blank" - /> + > +
+
@@ -339,11 +435,29 @@ exports[`Storyshots Components/Elements/ImageGallery Default 1`] = ` onMouseEnter={[Function]} onTouchStart={[Function]} target="_blank" - /> + > +
+
@@ -394,6 +508,14 @@ exports[`Storyshots Components/Elements/ImageGallery Default 1`] = `
+
@@ -404,11 +526,29 @@ exports[`Storyshots Components/Elements/ImageGallery Default 1`] = ` onMouseEnter={[Function]} onTouchStart={[Function]} target="_blank" - /> + > +
+
@@ -469,11 +609,29 @@ exports[`Storyshots Components/Elements/ImageGallery Default 1`] = ` onMouseEnter={[Function]} onTouchStart={[Function]} target="_blank" - /> + > +
+
@@ -534,11 +692,29 @@ exports[`Storyshots Components/Elements/ImageGallery Default 1`] = ` onMouseEnter={[Function]} onTouchStart={[Function]} target="_blank" - /> + > +
+
@@ -589,6 +765,14 @@ exports[`Storyshots Components/Elements/ImageGallery Default 1`] = `
+
@@ -599,11 +783,29 @@ exports[`Storyshots Components/Elements/ImageGallery Default 1`] = ` onMouseEnter={[Function]} onTouchStart={[Function]} target="_blank" - /> + > +
+
@@ -654,6 +856,14 @@ exports[`Storyshots Components/Elements/ImageGallery Default 1`] = `
+
@@ -664,11 +874,29 @@ exports[`Storyshots Components/Elements/ImageGallery Default 1`] = ` onMouseEnter={[Function]} onTouchStart={[Function]} target="_blank" - /> + > +
+
@@ -723,7 +951,16 @@ exports[`Storyshots Components/Elements/ImageGallery Default 1`] = `
+ > +
+

+ > +

+

+ > +

+
diff --git a/src/components/elements/Inputs/BooleanInput/__snapshots__/BooleanInput.stories.storyshot b/src/components/elements/Inputs/BooleanInput/__snapshots__/BooleanInput.stories.storyshot index 7cfac736f..dfc1cdbb4 100644 --- a/src/components/elements/Inputs/BooleanInput/__snapshots__/BooleanInput.stories.storyshot +++ b/src/components/elements/Inputs/BooleanInput/__snapshots__/BooleanInput.stories.storyshot @@ -53,6 +53,7 @@ exports[`Storyshots Components/Elements/Inputs/BooleanInput Default 1`] = ` className="flex flex-row-reverse items-center justify-end gap-3 " id=":re:" label="Yes" + onChange={[Function]} type="radio" /> @@ -86,6 +87,7 @@ exports[`Storyshots Components/Elements/Inputs/BooleanInput Default 1`] = ` className="flex flex-row-reverse items-center justify-end gap-3 " id=":rg:" label="No" + onChange={[Function]} type="radio" /> diff --git a/src/components/elements/Inputs/ConditionalInput/ConditionalInput.stories.tsx b/src/components/elements/Inputs/ConditionalInput/ConditionalInput.stories.tsx index 1e9d57f16..c5e99b25d 100644 --- a/src/components/elements/Inputs/ConditionalInput/ConditionalInput.stories.tsx +++ b/src/components/elements/Inputs/ConditionalInput/ConditionalInput.stories.tsx @@ -16,7 +16,8 @@ type Story = StoryObj; export const Default: Story = { render: args => { const formHook = useForm(); - return ; + const onChangeCapture = () => {}; + return ; }, args: { name: "conditional-field", diff --git a/src/components/elements/Inputs/ConditionalInput/__snapshots__/ConditionalInput.stories.storyshot b/src/components/elements/Inputs/ConditionalInput/__snapshots__/ConditionalInput.stories.storyshot index b8b201302..aa443fce1 100644 --- a/src/components/elements/Inputs/ConditionalInput/__snapshots__/ConditionalInput.stories.storyshot +++ b/src/components/elements/Inputs/ConditionalInput/__snapshots__/ConditionalInput.stories.storyshot @@ -54,6 +54,7 @@ Array [ className="flex flex-row-reverse items-center justify-end gap-3 " id=":rl:" label="Yes" + onChange={[Function]} type="radio" /> @@ -87,6 +88,7 @@ Array [ className="flex flex-row-reverse items-center justify-end gap-3 " id=":rn:" label="No" + onChange={[Function]} type="radio" /> diff --git a/src/components/elements/Inputs/Dropdown/__snapshots__/Dropdown.stories.storyshot b/src/components/elements/Inputs/Dropdown/__snapshots__/Dropdown.stories.storyshot index 7afb98a12..48ed83dc6 100644 --- a/src/components/elements/Inputs/Dropdown/__snapshots__/Dropdown.stories.storyshot +++ b/src/components/elements/Inputs/Dropdown/__snapshots__/Dropdown.stories.storyshot @@ -42,6 +42,14 @@ exports[`Storyshots Components/Elements/Inputs/Dropdown Multi Select 1`] = ` > placeholder +
@@ -89,6 +97,14 @@ exports[`Storyshots Components/Elements/Inputs/Dropdown Multi Select With Other > placeholder +
@@ -136,6 +152,14 @@ exports[`Storyshots Components/Elements/Inputs/Dropdown Single Select 1`] = ` > placeholder +
@@ -183,6 +207,14 @@ exports[`Storyshots Components/Elements/Inputs/Dropdown Single Select With Other > placeholder +
diff --git a/src/components/elements/Inputs/LanguageDropdown/__snapshots__/LanguagesDropdown.stories.storyshot b/src/components/elements/Inputs/LanguageDropdown/__snapshots__/LanguagesDropdown.stories.storyshot index 62b79263b..aaa73a5c6 100644 --- a/src/components/elements/Inputs/LanguageDropdown/__snapshots__/LanguagesDropdown.stories.storyshot +++ b/src/components/elements/Inputs/LanguageDropdown/__snapshots__/LanguagesDropdown.stories.storyshot @@ -19,11 +19,27 @@ exports[`Storyshots Components/Elements/Inputs/LanguagesDropdown Default 1`] = ` onMouseDown={[Function]} type="button" > +
English +
diff --git a/src/components/elements/Inputs/RadioGroup/__snapshots__/RadioGroup.stories.storyshot b/src/components/elements/Inputs/RadioGroup/__snapshots__/RadioGroup.stories.storyshot index fb42745a4..11a8a76e6 100644 --- a/src/components/elements/Inputs/RadioGroup/__snapshots__/RadioGroup.stories.storyshot +++ b/src/components/elements/Inputs/RadioGroup/__snapshots__/RadioGroup.stories.storyshot @@ -44,6 +44,7 @@ exports[`Storyshots Components/Elements/Inputs/RadioGroup Default 1`] = ` className="flex flex-row-reverse items-center justify-end gap-3 " id=":r1g:" label="Yes" + onChange={[Function]} type="radio" /> @@ -77,6 +78,7 @@ exports[`Storyshots Components/Elements/Inputs/RadioGroup Default 1`] = ` className="flex flex-row-reverse items-center justify-end gap-3 " id=":r1i:" label="No" + onChange={[Function]} type="radio" /> diff --git a/src/components/elements/LandingPage/__snapshots__/AlternatingSection.stories.storyshot b/src/components/elements/LandingPage/__snapshots__/AlternatingSection.stories.storyshot index d505d787e..6aabb122e 100644 --- a/src/components/elements/LandingPage/__snapshots__/AlternatingSection.stories.storyshot +++ b/src/components/elements/LandingPage/__snapshots__/AlternatingSection.stories.storyshot @@ -44,7 +44,7 @@ exports[`Storyshots Components/Elements/LandingPage/AlternatingSection Left 1`] className="flex justify-center bg-background md:w-[50%]" >
image
image @@ -32,7 +32,7 @@ exports[`Storyshots Components/Elements/SelectImageList Condensed 1`] = ` className="aspect-square h-[6.375rem] rounded-lg bg-cover bg-center transition-all duration-200" style={ Object { - "backgroundImage": "url('https://test.wrirestorationmarketplace.cubeapis.com/images/V2/sustainable-development-goals/good-health-and-well-being@2x.png')", + "backgroundImage": "url('https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/sustainable-development-goals/good-health-and-well-being@2x.png')", } } /> @@ -52,7 +52,7 @@ exports[`Storyshots Components/Elements/SelectImageList Condensed 1`] = ` className="aspect-square h-[6.375rem] rounded-lg bg-cover bg-center transition-all duration-200" style={ Object { - "backgroundImage": "url('https://test.wrirestorationmarketplace.cubeapis.com/images/V2/sustainable-development-goals/quality-education@2x.png')", + "backgroundImage": "url('https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/sustainable-development-goals/quality-education@2x.png')", } } /> @@ -72,7 +72,7 @@ exports[`Storyshots Components/Elements/SelectImageList Condensed 1`] = ` className="aspect-square h-[6.375rem] rounded-lg bg-cover bg-center transition-all duration-200" style={ Object { - "backgroundImage": "url('https://test.wrirestorationmarketplace.cubeapis.com/images/V2/sustainable-development-goals/affordable-and-clean-energy@2x.png')", + "backgroundImage": "url('https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/sustainable-development-goals/affordable-and-clean-energy@2x.png')", } } /> @@ -92,7 +92,7 @@ exports[`Storyshots Components/Elements/SelectImageList Condensed 1`] = ` className="aspect-square h-[6.375rem] rounded-lg bg-cover bg-center transition-all duration-200" style={ Object { - "backgroundImage": "url('https://test.wrirestorationmarketplace.cubeapis.com/images/V2/sustainable-development-goals/climate-action@2x.png')", + "backgroundImage": "url('https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/sustainable-development-goals/climate-action@2x.png')", } } /> @@ -119,7 +119,7 @@ exports[`Storyshots Components/Elements/SelectImageList Default 1`] = ` className="border-4 border-neutral-900 aspect-square h-[6.375rem] rounded-lg bg-cover bg-center transition-all duration-200" style={ Object { - "backgroundImage": "url('https://test.wrirestorationmarketplace.cubeapis.com/images/V2/sustainable-development-goals/no_poverty@2x.png')", + "backgroundImage": "url('https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/sustainable-development-goals/no_poverty@2x.png')", } } /> @@ -139,7 +139,7 @@ exports[`Storyshots Components/Elements/SelectImageList Default 1`] = ` className="border-4 border-neutral-900 aspect-square h-[6.375rem] rounded-lg bg-cover bg-center transition-all duration-200" style={ Object { - "backgroundImage": "url('https://test.wrirestorationmarketplace.cubeapis.com/images/V2/sustainable-development-goals/good-health-and-well-being@2x.png')", + "backgroundImage": "url('https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/sustainable-development-goals/good-health-and-well-being@2x.png')", } } /> @@ -159,7 +159,7 @@ exports[`Storyshots Components/Elements/SelectImageList Default 1`] = ` className="border-4 border-neutral-900 aspect-square h-[6.375rem] rounded-lg bg-cover bg-center transition-all duration-200" style={ Object { - "backgroundImage": "url('https://test.wrirestorationmarketplace.cubeapis.com/images/V2/sustainable-development-goals/quality-education@2x.png')", + "backgroundImage": "url('https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/sustainable-development-goals/quality-education@2x.png')", } } /> @@ -179,7 +179,7 @@ exports[`Storyshots Components/Elements/SelectImageList Default 1`] = ` className="border-4 border-neutral-900 aspect-square h-[6.375rem] rounded-lg bg-cover bg-center transition-all duration-200" style={ Object { - "backgroundImage": "url('https://test.wrirestorationmarketplace.cubeapis.com/images/V2/sustainable-development-goals/affordable-and-clean-energy@2x.png')", + "backgroundImage": "url('https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/sustainable-development-goals/affordable-and-clean-energy@2x.png')", } } /> @@ -199,7 +199,7 @@ exports[`Storyshots Components/Elements/SelectImageList Default 1`] = ` className="border-4 border-neutral-900 aspect-square h-[6.375rem] rounded-lg bg-cover bg-center transition-all duration-200" style={ Object { - "backgroundImage": "url('https://test.wrirestorationmarketplace.cubeapis.com/images/V2/sustainable-development-goals/climate-action@2x.png')", + "backgroundImage": "url('https://new-wri-staging.wri-restoration-marketplace-api.com/images/V2/sustainable-development-goals/climate-action@2x.png')", } } /> diff --git a/src/components/elements/Table/__snapshots__/Table.stories.storyshot b/src/components/elements/Table/__snapshots__/Table.stories.storyshot index 1d2763868..e2ef42969 100644 --- a/src/components/elements/Table/__snapshots__/Table.stories.storyshot +++ b/src/components/elements/Table/__snapshots__/Table.stories.storyshot @@ -13,6 +13,14 @@ exports[`Storyshots Components/Elements/Table Default 1`] = `
+
Show All

+
@@ -94,6 +110,14 @@ exports[`Storyshots Components/Elements/Table Default 1`] = ` onClick={[Function]} > Funding source +
Funding amount +
+

+

+

+

+

+

+

+

+

+

+ > +
+

+ > +

+

+ > +

+
diff --git a/src/components/extensive/ActionTracker/cards/__snapshots__/ApplicationsCard.stories.storyshot b/src/components/extensive/ActionTracker/cards/__snapshots__/ApplicationsCard.stories.storyshot index 786fab0dc..024613e50 100644 --- a/src/components/extensive/ActionTracker/cards/__snapshots__/ApplicationsCard.stories.storyshot +++ b/src/components/extensive/ActionTracker/cards/__snapshots__/ApplicationsCard.stories.storyshot @@ -258,24 +258,6 @@ exports[`Storyshots Components/Extensive/ActionTracker/ApplicationsCard Default > TerraFund for AFR100: Landscapes - Expression of Interest (Enterprises)

-
-
-

- Rejected -

-

TerraFund for AFR100: Landscapes - Expression of Interest (Enterprises)

+
+
+

+ More info requested +

+

- Awaiting Review + Awaiting approval

diff --git a/src/components/extensive/Pagination/__snapshots__/PerPageSelector.stories.storyshot b/src/components/extensive/Pagination/__snapshots__/PerPageSelector.stories.storyshot index fcfc894f3..efcc498c7 100644 --- a/src/components/extensive/Pagination/__snapshots__/PerPageSelector.stories.storyshot +++ b/src/components/extensive/Pagination/__snapshots__/PerPageSelector.stories.storyshot @@ -35,7 +35,16 @@ exports[`Storyshots Components/Elements/Table/PerPageSelector Default 1`] = `
+ > +
+

+

@@ -34,11 +42,27 @@ exports[`Storyshots Components/Generic/Layouts/MainLayout Default 1`] = ` onMouseDown={[Function]} type="button" > +
English +
@@ -103,6 +127,14 @@ exports[`Storyshots Components/Generic/Layouts/MainLayout Default 1`] = `
+
+
English +
@@ -139,7 +187,16 @@ exports[`Storyshots Components/Generic/Layouts/MainLayout Default 1`] = ` className="flex items-center justify-center rounded-full hover:bg-opacity-60 tour-menu-button block lg:hidden" disabled={false} onClick={[Function]} - /> + > +
+
+
@@ -28,11 +36,27 @@ exports[`Storyshots Components/Generic/Navbar Logged In 1`] = ` onMouseDown={[Function]} type="button" > +
English +
@@ -74,6 +98,14 @@ exports[`Storyshots Components/Generic/Navbar Logged In 1`] = `
+
+
English +
@@ -110,7 +158,16 @@ exports[`Storyshots Components/Generic/Navbar Logged In 1`] = ` className="flex items-center justify-center rounded-full hover:bg-opacity-60 tour-menu-button block lg:hidden" disabled={false} onClick={[Function]} - /> + > +
+ `; @@ -122,6 +179,14 @@ exports[`Storyshots Components/Generic/Navbar Logged Out 1`] = `
+
@@ -143,11 +208,27 @@ exports[`Storyshots Components/Generic/Navbar Logged Out 1`] = ` onMouseDown={[Function]} type="button" > +
English +
@@ -212,6 +293,14 @@ exports[`Storyshots Components/Generic/Navbar Logged Out 1`] = `
+
+
English +
@@ -248,7 +353,16 @@ exports[`Storyshots Components/Generic/Navbar Logged Out 1`] = ` className="flex items-center justify-center rounded-full hover:bg-opacity-60 tour-menu-button block lg:hidden" disabled={false} onClick={[Function]} - /> + > +
+
`; diff --git a/src/hooks/useGetCustomFormSteps/__snapshots__/useGetCustomFormSteps.stories.storyshot b/src/hooks/useGetCustomFormSteps/__snapshots__/useGetCustomFormSteps.stories.storyshot index 5d9041557..b0167205e 100644 --- a/src/hooks/useGetCustomFormSteps/__snapshots__/useGetCustomFormSteps.stories.storyshot +++ b/src/hooks/useGetCustomFormSteps/__snapshots__/useGetCustomFormSteps.stories.storyshot @@ -237,6 +237,14 @@ exports[`Storyshots Components/Extensive/Form/Wizard With Get Form Step Hook 1`] +
@@ -279,6 +287,14 @@ exports[`Storyshots Components/Extensive/Form/Wizard With Get Form Step Hook 1`] +
@@ -385,6 +401,14 @@ exports[`Storyshots Components/Extensive/Form/Wizard With Get Form Step Hook 1`] +
@@ -789,16 +813,25 @@ exports[`Storyshots Components/Extensive/Form/Wizard With Get Form Step Hook 1`]
+ > +
+

- Upload File (File format: PDF max. 5MB) + Upload File (File format: PDF max. 10MB)

Date: Mon, 27 May 2024 16:35:07 -0700 Subject: [PATCH 07/12] [TM-786] Handle some warnings in the codebase to help clean up jest output. --- .../Inputs/InputElements/InputLabel.tsx | 9 ++- .../elements/Tabs/Default/TabButton.tsx | 72 +++++++++---------- src/components/elements/Text/Text.tsx | 9 +-- src/components/extensive/List/List.tsx | 2 +- 4 files changed, 44 insertions(+), 48 deletions(-) diff --git a/src/components/elements/Inputs/InputElements/InputLabel.tsx b/src/components/elements/Inputs/InputElements/InputLabel.tsx index 38e934669..3550727b8 100644 --- a/src/components/elements/Inputs/InputElements/InputLabel.tsx +++ b/src/components/elements/Inputs/InputElements/InputLabel.tsx @@ -1,6 +1,6 @@ import { useT } from "@transifex/react"; import classNames from "classnames"; -import { HTMLProps } from "react"; +import { forwardRef, HTMLProps, RefObject } from "react"; import { When } from "react-if"; import StatusPill from "@/components/elements/StatusPill/StatusPill"; @@ -12,7 +12,7 @@ export interface InputLabelProps extends HTMLProps { feedbackRequired?: boolean; } -const InputLabel = (props: InputLabelProps) => { +export default forwardRef(function InputLabel(props: InputLabelProps, ref) { const t = useT(); const { feedbackRequired, required, children, className, ...labelProps } = props; @@ -20,6 +20,7 @@ const InputLabel = (props: InputLabelProps) => { {...labelProps} + ref={ref as RefObject} as="label" variant="text-bold-body-300" className={classNames("mr-2 inline uppercase", className)} @@ -34,6 +35,4 @@ const InputLabel = (props: InputLabelProps) => { ); -}; - -export default InputLabel; +}); diff --git a/src/components/elements/Tabs/Default/TabButton.tsx b/src/components/elements/Tabs/Default/TabButton.tsx index cdb96a69b..3980b1953 100644 --- a/src/components/elements/Tabs/Default/TabButton.tsx +++ b/src/components/elements/Tabs/Default/TabButton.tsx @@ -1,5 +1,5 @@ import classNames from "classnames"; -import { ButtonHTMLAttributes, DetailedHTMLProps } from "react"; +import { ButtonHTMLAttributes, DetailedHTMLProps, forwardRef } from "react"; import { When } from "react-if"; import Text from "@/components/elements/Text/Text"; @@ -16,40 +16,36 @@ export interface TabButtonProps extends DetailedHTMLProps { - return ( - - ); -}; +export const TabButton = forwardRef( + ({ index, item, lastItem, selected, className, textVariant, ...buttonProps }: TabButtonProps, ref) => { + // @ts-ignore + buttonProps["ref"] = ref; + return ( + + ); + } +); diff --git a/src/components/elements/Text/Text.tsx b/src/components/elements/Text/Text.tsx index 1d36ee0f7..34298a0b7 100644 --- a/src/components/elements/Text/Text.tsx +++ b/src/components/elements/Text/Text.tsx @@ -1,6 +1,6 @@ import cn from "classnames"; import _ from "lodash"; -import { HTMLProps, ReactNode } from "react"; +import { ForwardedRef, forwardRef, HTMLProps, ReactElement, ReactNode, Ref } from "react"; import { TextVariants } from "@/types/common"; @@ -13,7 +13,7 @@ export type TextProps = HTMLProps & { capitalize?: boolean; }; -function Text(props: TextProps): JSX.Element { +function Text(props: TextProps, ref: ForwardedRef): JSX.Element { const { as: As, className, children, variant, capitalize, containHtml, ...rest } = props; const Component = As || "p"; @@ -23,6 +23,7 @@ function Text(props: TextProps): JSX.Element { return ( (props: TextProps): JSX.Element { ); } else return ( - + {typeof children === "string" ? _.unescape(children) : children} ); } -export default Text; +export default forwardRef(Text) as (p: TextProps & { ref?: Ref }) => ReactElement; diff --git a/src/components/extensive/List/List.tsx b/src/components/extensive/List/List.tsx index 09bb7a9e7..3ccc82ef0 100644 --- a/src/components/extensive/List/List.tsx +++ b/src/components/extensive/List/List.tsx @@ -38,7 +38,7 @@ const List = , U>({ {startListElement ? {startListElement} : <>} {items.map((item, i, array) => ( - + {render(item, i, array)} {dividerComponent} From 3e9dd6727214668e2a3cec1e3974136a961ecb12 Mon Sep 17 00:00:00 2001 From: Nathan Curtis Date: Mon, 27 May 2024 16:46:23 -0700 Subject: [PATCH 08/12] [TM-786] Set up test of github actions --- .github/workflows/pull-request.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/pull-request.yml diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml new file mode 100644 index 000000000..b291ad262 --- /dev/null +++ b/.github/workflows/pull-request.yml @@ -0,0 +1,16 @@ +name: pull-request +on: workflow_dispatch +# pull_request: +# branches: [main, staging, release/**] +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + - name: Install modules + run: yarn + - name: Test + run: yarn run jest --ci From cb1a2a079f7faecaed187db6651a93cdc4eea8ad Mon Sep 17 00:00:00 2001 From: Nathan Curtis Date: Mon, 27 May 2024 16:48:30 -0700 Subject: [PATCH 09/12] [TM-786] Add .nvmrc to match our node version on prod --- .nvmrc | 1 + 1 file changed, 1 insertion(+) create mode 100644 .nvmrc diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 000000000..603606bc9 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +18.17.0 From 4f549592469b1f9ad5a0c2cc07e2d4ffffa86011 Mon Sep 17 00:00:00 2001 From: Nathan Curtis Date: Mon, 27 May 2024 16:51:17 -0700 Subject: [PATCH 10/12] [TM-786] Run test action on pull requests. --- .github/workflows/pull-request.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index b291ad262..194b0c659 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -1,7 +1,7 @@ name: pull-request -on: workflow_dispatch -# pull_request: -# branches: [main, staging, release/**] +on: + pull_request: + branches: [main, staging, release/**] jobs: test: runs-on: ubuntu-latest From 4ba0d878ddeee6d7e3607ca698e43ffcecc07086 Mon Sep 17 00:00:00 2001 From: Nathan Curtis Date: Mon, 27 May 2024 21:18:54 -0700 Subject: [PATCH 11/12] [TM-786] Fix some generic typing. --- src/components/elements/Text/Text.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/elements/Text/Text.tsx b/src/components/elements/Text/Text.tsx index 34298a0b7..0baac7c40 100644 --- a/src/components/elements/Text/Text.tsx +++ b/src/components/elements/Text/Text.tsx @@ -1,6 +1,6 @@ import cn from "classnames"; import _ from "lodash"; -import { ForwardedRef, forwardRef, HTMLProps, ReactElement, ReactNode, Ref } from "react"; +import { ForwardedRef, forwardRef, HTMLProps, LegacyRef, ReactElement, ReactNode } from "react"; import { TextVariants } from "@/types/common"; @@ -13,7 +13,7 @@ export type TextProps = HTMLProps & { capitalize?: boolean; }; -function Text(props: TextProps, ref: ForwardedRef): JSX.Element { +function Text(props: TextProps, ref: ForwardedRef): JSX.Element { const { as: As, className, children, variant, capitalize, containHtml, ...rest } = props; const Component = As || "p"; @@ -37,4 +37,4 @@ function Text(props: TextProps, ref: ForwardedRef): JSX.Element { ); } -export default forwardRef(Text) as (p: TextProps & { ref?: Ref }) => ReactElement; +export default forwardRef(Text) as (p: TextProps & { ref?: LegacyRef }) => ReactElement; From 82af91801faa16234b4f213cc058a8774e08cd9e Mon Sep 17 00:00:00 2001 From: Nathan Curtis Date: Mon, 27 May 2024 21:19:23 -0700 Subject: [PATCH 12/12] [TM-786] Fix a hook dependency warning. --- src/components/extensive/WorkdayCollapseGrid/WorkdaySection.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/extensive/WorkdayCollapseGrid/WorkdaySection.tsx b/src/components/extensive/WorkdayCollapseGrid/WorkdaySection.tsx index 7a303c49b..db64af006 100644 --- a/src/components/extensive/WorkdayCollapseGrid/WorkdaySection.tsx +++ b/src/components/extensive/WorkdayCollapseGrid/WorkdaySection.tsx @@ -68,7 +68,7 @@ const WorkdaySection = ({ demographics, type, variant, onChange }: WorkdaySectio updatedDemographics.splice(index, 1); onChange(updatedDemographics); }, - [demographics, onChange, type] + [demographics, onChange] ); // Tailwind doesn't supply classes for high row counts, so we apply this prop ourselves.