From 533c7cc7e52c1f9f39f0e6e96579fa71899e37b8 Mon Sep 17 00:00:00 2001 From: PriJoh Date: Tue, 17 Dec 2024 15:22:54 +0100 Subject: [PATCH] pfe-107 Changed import type for constantspayex file in index --- .../components/Card/index.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/App/ComponentsDocumentation/components/Card/index.js b/src/App/ComponentsDocumentation/components/Card/index.js index fad17cad99..7faca8ddaf 100644 --- a/src/App/ComponentsDocumentation/components/Card/index.js +++ b/src/App/ComponentsDocumentation/components/Card/index.js @@ -21,6 +21,20 @@ const basename = process.env.basename; const brand = process.env.brand; const Overview = () => { + + + const [overviewCards, setOverviewCards] = useState(null); + + useEffect(() => { + const loadOverviewCards = async () => { + const constants = await import(`./${brand === "payex" ? "constantspayex" : "constants"}`); + setOverviewCards(constants.overviewCards); + }; + + loadOverviewCards(); + }, [brand]); + + return ( <>

Overview