mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-04-26 19:08:26 -04:00
dynamically load react-player
This commit is contained in:
parent
70778db89d
commit
6cde2944fc
@ -1,8 +1,10 @@
|
||||
import ReactPlayer from "react-player/lazy";
|
||||
import dynamic from "next/dynamic";
|
||||
import type { ReactPlayerProps } from "react-player";
|
||||
|
||||
import styles from "./FullPageVideo.module.scss";
|
||||
|
||||
const ReactPlayer = dynamic(() => import("react-player"));
|
||||
|
||||
const FullPageVideo = (props: ReactPlayerProps) => (
|
||||
<div className={styles.wrapper}>
|
||||
<ReactPlayer className={styles.react_player} width="100%" height="100%" {...props} />
|
||||
|
Loading…
x
Reference in New Issue
Block a user