diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..a3c03d68 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "cSpell.words": ["sdgs"] +} diff --git a/client/src/components/forms/dataset/colors.tsx b/client/src/components/forms/dataset/colors.tsx index 4f58792c..5ae5ebf8 100644 --- a/client/src/components/forms/dataset/colors.tsx +++ b/client/src/components/forms/dataset/colors.tsx @@ -333,7 +333,7 @@ export default function DatasetColorsForm({ ), })} onChange={(e) => { - return field.onChange(e.target.value); + return field.onChange(e?.target?.value); }} disabled={status === "declined" && ME_DATA?.role?.type !== "admin"} /> diff --git a/client/src/containers/welcome-message/index.tsx b/client/src/containers/welcome-message/index.tsx index dc84baf3..c0a4f382 100644 --- a/client/src/containers/welcome-message/index.tsx +++ b/client/src/containers/welcome-message/index.tsx @@ -2,6 +2,8 @@ import { useEffect, useRef, useState } from "react"; +import isEmpty from "lodash-es/isEmpty"; + import { useCookies } from "react-cookie"; import ReactPlayer from "react-player"; @@ -10,8 +12,6 @@ import Image from "next/image"; import { LuPlay } from "react-icons/lu"; import screenfull from "screenfull"; -import env from "@/env.mjs"; - import { cn } from "@/lib/classnames"; import { useGetWelcomeMessage } from "@/types/generated/welcome-message"; @@ -39,12 +39,12 @@ export default function WelcomeMessage() { if (!videoRefContainer.current) return; setPlaying((prev) => !prev); screenfull?.request(videoRefContainer.current); + }; const handleFullscreen = () => { setFullscreen(screenfull?.isFullscreen); }; - useEffect(() => { if (screenfull.isEnabled) { screenfull.on("change", handleFullscreen); @@ -88,9 +88,7 @@ export default function WelcomeMessage() { {data?.data?.attributes?.image && ( Welcome message setPlaying(true)} onPause={() => setPlaying(false)} controls - // TO DO - get URL dynamically - // url={`${env.NEXT_PUBLIC_CMS_URL}${data?.data?.attributes?.video?.data?.attributes?.url}`} - url="https://ccsa-staging-assets-bucket.s3.amazonaws.com/SID_4_Pre_Event_MAP_Video_4f0cdbfa51.mp4" + url={`${data?.data?.attributes?.video?.data?.attributes?.url}`} width={"100%"} height={"100%"} />