From 4bd09c87c873a39ca28b6e501e60743eb282926d Mon Sep 17 00:00:00 2001 From: Anjali Jay Jain <116294517+JayJ104@users.noreply.github.com> Date: Tue, 12 Nov 2024 21:55:23 -0800 Subject: [PATCH] refactoring api & i18n for include cms --- next.config.mjs | 7 +- src/components/about-us/YoutubeEmbed.jsx | 28 +- src/components/about-us/carousel.jsx | 8 +- src/components/about-us/flippingCard.jsx | 8 +- src/components/committees/committee.jsx | 27 +- .../committees/committeeDesription.jsx | 15 +- src/components/footer/footer.jsx | 16 +- src/components/get-involved/card.jsx | 26 +- src/components/get-involved/popupCard.jsx | 43 +- src/components/header/header.jsx | 14 +- src/components/homepage/homepageGallery.jsx | 23 +- src/components/layout.jsx | 8 +- src/components/services/imageSlider.jsx | 64 ++- src/components/services/imageSliderMobile.jsx | 57 +-- src/messages/about-us.json | 368 ++++++++++++++++++ src/messages/committees.json | 220 +++++++++++ src/messages/en.json | 285 -------------- src/messages/es.json | 285 -------------- src/messages/general.json | 92 +++++ src/messages/get-involved.json | 98 +++++ src/messages/hmn.json | 285 -------------- src/messages/home.json | 118 ++++++ src/messages/ko.json | 285 -------------- src/messages/services.json | 307 +++++++++++++++ src/messages/vi.json | 285 -------------- src/messages/zh.json | 285 -------------- src/pages/404.jsx | 50 ++- src/pages/about-us/index.jsx | 177 ++++----- src/pages/api/about-us.js | 156 +++----- src/pages/api/committees.js | 118 +++--- src/pages/api/general.js | 40 ++ src/pages/api/get-involved.js | 100 +++-- src/pages/api/header.js | 48 --- src/pages/api/home.js | 169 +++----- src/pages/api/services.js | 153 +++----- src/pages/committees/[committee].jsx | 84 ++-- src/pages/committees/index.jsx | 55 ++- src/pages/get-involved/index.jsx | 68 ++-- src/pages/index.jsx | 158 +++----- src/pages/services/index.jsx | 89 +++-- .../about-us/flippingCard.module.scss | 12 +- .../committees/committee.module.scss | 3 +- .../get-involved/popupCard.module.scss | 9 +- .../pages/error-page/error-page.module.scss | 24 ++ src/styles/pages/home/home.module.scss | 55 +-- .../pages/services/services.module.scss | 1 + 46 files changed, 2099 insertions(+), 2727 deletions(-) create mode 100644 src/messages/about-us.json create mode 100644 src/messages/committees.json delete mode 100644 src/messages/en.json delete mode 100644 src/messages/es.json create mode 100644 src/messages/general.json create mode 100644 src/messages/get-involved.json delete mode 100644 src/messages/hmn.json create mode 100644 src/messages/home.json delete mode 100644 src/messages/ko.json create mode 100644 src/messages/services.json delete mode 100644 src/messages/vi.json delete mode 100644 src/messages/zh.json create mode 100644 src/pages/api/general.js delete mode 100644 src/pages/api/header.js create mode 100644 src/styles/pages/error-page/error-page.module.scss diff --git a/next.config.mjs b/next.config.mjs index cbd200d..2a8e3a9 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -9,7 +9,12 @@ const nextConfig = { reactStrictMode: true, i18n: { ...i18n }, images: { - domains: ["res.cloudinary.com"], + remotePatterns: [ + { + protocol: 'https', + hostname: 'res.cloudinary.com', + }, + ] }, }; diff --git a/src/components/about-us/YoutubeEmbed.jsx b/src/components/about-us/YoutubeEmbed.jsx index 287c58d..0de71c0 100644 --- a/src/components/about-us/YoutubeEmbed.jsx +++ b/src/components/about-us/YoutubeEmbed.jsx @@ -2,19 +2,25 @@ import React from "react"; import PropTypes from "prop-types"; import styles from "@/styles/pages/about/youtube.module.scss"; -const YoutubeEmbed = ({ embedId }) => ( -
-