diff --git a/dance-app/src/App.tsx b/dance-app/src/App.tsx
index ed88b05..8d73e78 100644
--- a/dance-app/src/App.tsx
+++ b/dance-app/src/App.tsx
@@ -58,7 +58,7 @@ function App() {
>
{auth.token !== "" ? (
-
+
) : (
diff --git a/dance-app/src/sections/landing.tsx b/dance-app/src/sections/landing.tsx
index 360963a..6cda803 100644
--- a/dance-app/src/sections/landing.tsx
+++ b/dance-app/src/sections/landing.tsx
@@ -105,7 +105,7 @@ const LandingPage = ({ pb }: LandingProps) => {
)}
>
) : (
-
+
)}
>
);
diff --git a/dance-app/src/sections/recording.tsx b/dance-app/src/sections/recording.tsx
index f807323..c755661 100644
--- a/dance-app/src/sections/recording.tsx
+++ b/dance-app/src/sections/recording.tsx
@@ -1,11 +1,12 @@
-import { FC, useRef, useState } from "react";
+import { FC, useContext, useRef, useState } from "react";
import { useRecordWebcam } from "react-record-webcam";
import { Recording } from "react-record-webcam/dist/useRecording";
-import Drawer from "../components/Drawer";
import Leaderboard from "../components/Leaderboard";
import Submit from "../Submit";
import "../Recording.css";
import { RefVideo } from "./landing";
+import Pocketbase from "pocketbase";
+import { PageContext } from "../context/PageContext";
enum VideoState {
recording = "recording",
@@ -16,8 +17,9 @@ const options = {
mimeType: "video/webm;codecs:vp9",
};
-const RecordingPage: FC<{ refVideo: RefVideo | undefined }> = ({
+const RecordingPage: FC<{ refVideo: RefVideo | undefined; pb: Pocketbase }> = ({
refVideo,
+ pb,
}) => {
const constraints: { aspectRatio: number; height: number; width: number } = {
aspectRatio: 2.33,
@@ -35,8 +37,8 @@ const RecordingPage: FC<{ refVideo: RefVideo | undefined }> = ({
recorderOptions: options,
constraints,
});
+ const page = useContext(PageContext);
const [showVideo, setShowVideo] = useState(VideoState.preview);
- const [view, setView] = useState<"record" | "leaderboard">("record");
const recordingRef = useRef(null);
const hasRecording = recordingRef.current?.previewRef.current?.src;
@@ -64,10 +66,7 @@ const RecordingPage: FC<{ refVideo: RefVideo | undefined }> = ({
console.log(recordingRef.current);
};
return (
-
-
setView(view === "record" ? "leaderboard" : "record")}
- />
+
-
+