1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-09-18 16:05:33 -04:00

more error handling

This commit is contained in:
2025-03-31 09:15:40 -04:00
parent 50c184fb21
commit ec7c9fae54
15 changed files with 114 additions and 143 deletions

View File

@@ -1,4 +0,0 @@
/* stylelint-disable-next-line selector-type-no-unknown */
.wrapper lite-youtube {
margin: 0 auto;
}

View File

@@ -1,17 +1,14 @@
import { YouTubeEmbed } from "@next/third-parties/google";
"use client";
import styles from "./YouTube.module.css";
import YouTubeEmbed from "react-lite-youtube-embed";
import type { ComponentPropsWithoutRef } from "react";
export type YouTubeProps = {
id: string;
};
import "react-lite-youtube-embed/dist/LiteYouTubeEmbed.css";
const YouTube = ({ id }: YouTubeProps) => {
return (
<div className={styles.wrapper}>
<YouTubeEmbed videoid={id} />
</div>
);
export type YouTubeProps = Omit<ComponentPropsWithoutRef<typeof YouTubeEmbed>, "title">;
const YouTube = ({ ...rest }: YouTubeProps) => {
return <YouTubeEmbed cookie={false} containerElement="div" title="" {...rest} />;
};
export default YouTube;