Skip to content

Commit

Permalink
Merge branch 'main' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
mluena authored Oct 2, 2024
2 parents 4434845 + 338729d commit e9bd78f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"cSpell.words": ["sdgs"]
}
2 changes: 1 addition & 1 deletion client/src/components/forms/dataset/colors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
/>
Expand Down
14 changes: 5 additions & 9 deletions client/src/containers/welcome-message/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand All @@ -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";
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -88,9 +88,7 @@ export default function WelcomeMessage() {

{data?.data?.attributes?.image && (
<Image
// TO DO - get URL dynamically
// src="https://ccsa-staging-assets-bucket.s3.amazonaws.com/welcome_image_34ad0d15bc.png"
src={`${env.NEXT_PUBLIC_CMS_URL}${data?.data?.attributes?.image?.data?.attributes?.url}`}
src={`${data?.data?.attributes?.image?.data?.attributes?.url}`}
alt="Welcome message"
width={data?.data?.attributes?.image?.data?.attributes?.width}
height={data?.data?.attributes?.image?.data?.attributes?.height}
Expand All @@ -111,9 +109,7 @@ export default function WelcomeMessage() {
onPlay={() => 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%"}
/>
Expand Down

0 comments on commit e9bd78f

Please sign in to comment.