diff --git a/next.config.mjs b/next.config.mjs index b185604..b17554b 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -32,6 +32,12 @@ const config = { port: '', pathname: '/**', }, + { + protocol: 'https', + hostname: '*.githubusercontent.com', + port: '', + pathname: '/**', + }, ], }, }; diff --git a/src/pages/share/[videoId].tsx b/src/pages/share/[videoId].tsx index 6308314..800323c 100644 --- a/src/pages/share/[videoId].tsx +++ b/src/pages/share/[videoId].tsx @@ -5,6 +5,7 @@ import { api } from "~/utils/api"; import ReactPlayer from "react-player"; import { useRouter } from "next/router"; import Link from "next/link"; +import Image from "next/image"; const VideoList: NextPage = () => { const router = useRouter(); @@ -52,11 +53,8 @@ const VideoList: NextPage = () => { -
+
- {/*{true ? (*/} - {/*
*/} - {/*) : null}*/} {video?.video?.video_url && ( { /> )}
+
+
+ {video?.video?.title ? ( + + {video?.video?.title} + + ) : ( +
+ )} +
+
+ {!isLoading ? ( + <> +
+ profile photo +
+ + {video?.video?.user?.name} + + + ) : ( + <> +
+
+ + )} +
+
diff --git a/src/server/api/routers/video.ts b/src/server/api/routers/video.ts index 9cf0f6e..bfed8c0 100644 --- a/src/server/api/routers/video.ts +++ b/src/server/api/routers/video.ts @@ -24,6 +24,9 @@ export const videoRouter = createTRPCRouter({ where: { id: input.videoId, }, + include: { + user: true, + }, }); if (video?.userId !== ctx.session.user.id) {