summaryrefslogtreecommitdiff
path: root/src/views/Intro.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2021-09-27 15:38:49 +0200
committerJules Laplace <julescarbon@gmail.com>2021-09-27 15:38:49 +0200
commit8c14599404e3905ebfedb148f9d23d09f26331e3 (patch)
tree1952dd070e4d74445838c1d864d824c9e083a46c /src/views/Intro.js
parent64408333a8b5378564911766f6e40add0862e28f (diff)
graph, intro
Diffstat (limited to 'src/views/Intro.js')
-rw-r--r--src/views/Intro.js35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/views/Intro.js b/src/views/Intro.js
new file mode 100644
index 0000000..9c00ce4
--- /dev/null
+++ b/src/views/Intro.js
@@ -0,0 +1,35 @@
+/**
+ * Intro
+ */
+
+import React, { useState } from "react";
+import Vimeo from "@u-wave/react-vimeo";
+
+export default function Intro({ onComplete }) {
+ const [done, setDone] = useState(false);
+ const handleClose = () => {
+ setDone(true);
+ setTimeout(() => {
+ onComplete();
+ }, 200);
+ };
+ return (
+ <div className={done ? "intro done" : "intro"}>
+ <img
+ className="close"
+ src="/assets/img/close.svg"
+ onClick={handleClose}
+ />
+ <Vimeo
+ video="https://vimeo.com/612279630"
+ className="intro-video"
+ muted
+ autoplay
+ showByline={false}
+ showPortrait={false}
+ showTitle={false}
+ onEnd={handleClose}
+ />
+ </div>
+ );
+}