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:
@@ -1,4 +0,0 @@
|
||||
/* stylelint-disable-next-line selector-type-no-unknown */
|
||||
.wrapper lite-youtube {
|
||||
margin: 0 auto;
|
||||
}
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user