From c3398948ffa608d132503ab94790857f8d53891c Mon Sep 17 00:00:00 2001
From: Yuval Adam <_@yuv.al>
Date: Mon, 29 Aug 2022 11:41:21 +0300
Subject: Fix more types in components

---
 src/Datetime.tsx | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

(limited to 'src/Datetime.tsx')

diff --git a/src/Datetime.tsx b/src/Datetime.tsx
index 9807211..84009a7 100644
--- a/src/Datetime.tsx
+++ b/src/Datetime.tsx
@@ -1,12 +1,16 @@
 import React from "react";
 import { DateTime as LuxonDateTime } from "luxon";
 
-function DateTime(props) {
-  let { images, slider } = props;
+interface DateTimeProps {
+  images: string[],
+  slider: number
+}
+
+function DateTime({ images, slider }: DateTimeProps) {
   let datetime = null;
 
   if (images.length > 0) {
-    const ds = images[slider].substr(5, 13);
+    const ds = images[slider].substring(5, 18);
     datetime = LuxonDateTime.fromFormat(ds, "yyyyMMdd/HHmm", {
       zone: "utc",
     }).setZone("Asia/Jerusalem");
-- 
cgit v1.3.1

