From 6448e414c0cae3caf1d47ea3e9f2f5b48a9537c8 Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Fri, 6 May 2022 15:16:28 -0500 Subject: [PATCH] Add timestamps component --- src/components/video/timestamps.astro | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/components/video/timestamps.astro diff --git a/src/components/video/timestamps.astro b/src/components/video/timestamps.astro new file mode 100644 index 0000000..0511e4b --- /dev/null +++ b/src/components/video/timestamps.astro @@ -0,0 +1,26 @@ +--- +const { + video +} = Astro.props + +const hasTimeStamps = video.timestamps.length > 0 + +--- +{ hasTimeStamps && +
+
+ { video.timestamps.map( timestamp => { + // const inSeconds = (minutes * 60) + Number(seconds) + return ( + + ) + })} +
+
+}