Skip to content

Commit

Permalink
đŸ’„Restored styling on livestream widget to former state
Browse files Browse the repository at this point in the history
  • Loading branch information
Calinator444 committed Sep 17, 2024
1 parent 69d8bbd commit 4885d2c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
6 changes: 6 additions & 0 deletions app/live-steam-banner/liveStreamWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ export const LiveStreamWidget = ({ isLive, event }: LiveStreamWidgetProps) => {
<VideoEmbed
data={{
url: youtubeUrls?.videoUrl,
videoWidth: "w-full",
removeMargin: true,
roundedEdges: false,
}}
/>
</div>
Expand All @@ -144,6 +147,9 @@ export const LiveStreamWidget = ({ isLive, event }: LiveStreamWidgetProps) => {
<VideoEmbed
data={{
url: youtubeUrls?.videoUrl,
videoWidth: "w-full",
removeMargin: true,
roundedEdges: false,
}}
/>
</div>
Expand Down
2 changes: 2 additions & 0 deletions components/blocks/videoEmbed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { VideoModal } from "../videoModal";
type VideoEmbedProps = {
data: {
url: string;
roundedEdges?: boolean;
videoWidth?: string;
removeMargin?: boolean;
overflow?: boolean;
Expand All @@ -26,6 +27,7 @@ export const VideoEmbed = ({ data }: VideoEmbedProps) => {
<VideoModal
url={data.url}
overflow={data.overflow}
roundedEdges={data.roundedEdges}
className="cursor-pointer"
/>
{data.caption && (
Expand Down
6 changes: 6 additions & 0 deletions components/liveStream/liveStreamWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ export const LiveStreamWidget = ({ isLive, event }: LiveStreamWidgetProps) => {
<VideoEmbed
data={{
url: youtubeUrls.videoUrl,
videoWidth: "w-full",
removeMargin: true,
roundedEdges: false,
}}
/>
</div>
Expand All @@ -146,6 +149,9 @@ export const LiveStreamWidget = ({ isLive, event }: LiveStreamWidgetProps) => {
<VideoEmbed
data={{
url: youtubeUrls.videoUrl,
videoWidth: "w-full",
removeMargin: true,
roundedEdges: false,
}}
/>
</div>
Expand Down
10 changes: 8 additions & 2 deletions components/videoModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const VimeoEmbed = dynamic(
type VideoModalProps = {
children?: React.ReactNode;
className?: string;
roundedEdges?: boolean;
url: string;
overflow?: boolean;
};
Expand All @@ -43,12 +44,12 @@ export const VideoModal = ({
children = null,
url,
overflow,
roundedEdges,
className,
}: VideoModalProps) => {
const [videoId, setVideoId] = useState<string>();
const [clicked, setClicked] = useState<boolean>(false);
const [imageSrc, setImageSrc] = useState<string>("");

const isYouTube = MATCH_URL_YOUTUBE.test(url);
const isVimeo = MATCH_URL_VIMEO.test(url);

Expand All @@ -72,7 +73,12 @@ export const VideoModal = ({
return (
<div
className={classNames(
"h-full rounded",
"h-full",
roundedEdges === null ||
roundedEdges === undefined ||
roundedEdges === true
? "rounded"
: "rounded-none",
overflow ? "clear-both" : "overflow-hidden",
className
)}
Expand Down

0 comments on commit 4885d2c

Please sign in to comment.