From 44a1c5b7e62e83af4d670e011f5998b9b8aedfef Mon Sep 17 00:00:00 2001
From: Yuval Adam <_@yuv.al>
Date: Mon, 29 Aug 2022 10:24:51 +0300
Subject: Update all .tsx files and remove unused

---
 src/index.tsx | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 src/index.tsx

(limited to 'src/index.tsx')

diff --git a/src/index.tsx b/src/index.tsx
new file mode 100644
index 0000000..8d5df82
--- /dev/null
+++ b/src/index.tsx
@@ -0,0 +1,13 @@
+import React from 'react';
+import ReactDOM from 'react-dom/client';
+import './index.css';
+import App from './Geshem';
+
+console.log()
+
+const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement);
+root.render(
+    <React.StrictMode>
+        <App />
+    </React.StrictMode >
+);
\ No newline at end of file
-- 
cgit v1.3.1


From 43fff9d6f8e1b7ba38078804217bb98f6740af99 Mon Sep 17 00:00:00 2001
From: Yuval Adam <_@yuv.al>
Date: Thu, 1 Sep 2022 09:31:33 +0300
Subject: Fix default exports

---
 src/Datetime.tsx    |  4 +---
 src/Geshem.test.tsx |  2 +-
 src/Geshem.tsx      | 12 +++++-------
 src/Map.tsx         |  7 ++-----
 src/Slider.tsx      |  4 +---
 src/index.tsx       |  2 +-
 6 files changed, 11 insertions(+), 20 deletions(-)

(limited to 'src/index.tsx')

diff --git a/src/Datetime.tsx b/src/Datetime.tsx
index 84009a7..0a8fbcf 100644
--- a/src/Datetime.tsx
+++ b/src/Datetime.tsx
@@ -6,7 +6,7 @@ interface DateTimeProps {
   slider: number
 }
 
-function DateTime({ images, slider }: DateTimeProps) {
+export function DateTime({ images, slider }: DateTimeProps) {
   let datetime = null;
 
   if (images.length > 0) {
@@ -26,5 +26,3 @@ function DateTime({ images, slider }: DateTimeProps) {
     </div>
   );
 }
-
-export default DateTime;
diff --git a/src/Geshem.test.tsx b/src/Geshem.test.tsx
index 185b1f4..8e4652d 100644
--- a/src/Geshem.test.tsx
+++ b/src/Geshem.test.tsx
@@ -1,6 +1,6 @@
 import React from 'react';
 import ReactDOM from 'react-dom';
-import Geshem from './Geshem';
+import { Geshem } from './Geshem';
 
 it('renders without crashing', () => {
   const div = document.createElement('div');
diff --git a/src/Geshem.tsx b/src/Geshem.tsx
index a0750d4..5210622 100644
--- a/src/Geshem.tsx
+++ b/src/Geshem.tsx
@@ -1,16 +1,16 @@
 import React, { useState, useEffect } from "react";
 import { BrowserRouter, Route, Routes } from "react-router-dom";
 
-import Map from "./Map";
-import Slider from "./Slider";
-import DateTime from "./Datetime";
+import { Map } from "./Map";
+import { Slider } from "./Slider";
+import { DateTime } from "./Datetime";
 
 import { IMAGES_BASE_URL } from "./config";
 
 import "./Geshem.css";
 import "rc-slider/assets/index.css";
 
-function App() {
+export function App() {
   return (
     <BrowserRouter>
       <Routes>
@@ -25,7 +25,7 @@ interface GeshemProps {
   date?: string
 }
 
-function Geshem({ date }: GeshemProps) {
+export function Geshem({ date }: GeshemProps) {
   const [images, setImages] = useState<string[]>([]);
   const [playback] = useState(
     date ||
@@ -77,5 +77,3 @@ function Geshem({ date }: GeshemProps) {
     </>
   );
 }
-
-export default App;
diff --git a/src/Map.tsx b/src/Map.tsx
index 62bebb2..7a49416 100644
--- a/src/Map.tsx
+++ b/src/Map.tsx
@@ -15,7 +15,7 @@ interface MapProps {
   images: string[],
 }
 
-function Map({ slider, images }: MapProps) {
+export function Map({ slider, images }: MapProps) {
   const mapContainer = useRef(null);
   const map = useRef<mapboxgl.Map>(null);
   const [lng, setLng] = useState(35);
@@ -60,7 +60,7 @@ function Map({ slider, images }: MapProps) {
       }} />
     </div>
   );
-
+}
   // return (
   //   <Mapbox >
   //     {images.map((img, i) => {
@@ -93,6 +93,3 @@ function Map({ slider, images }: MapProps) {
   //     })}
   //   </Mapbox>
   // );
-}
-
-export default Map;
diff --git a/src/Slider.tsx b/src/Slider.tsx
index 64edb99..4d287a2 100644
--- a/src/Slider.tsx
+++ b/src/Slider.tsx
@@ -10,7 +10,7 @@ interface GeshemSliderProps {
   setSlider: React.Dispatch<React.SetStateAction<number>>
 }
 
-function Slider({ playback, slider, setSlider }: GeshemSliderProps) {
+export function Slider({ playback, slider, setSlider }: GeshemSliderProps) {
   const handleStyle = {
     height: 40,
     width: 40,
@@ -42,5 +42,3 @@ function Slider({ playback, slider, setSlider }: GeshemSliderProps) {
     </div>
   );
 }
-
-export default Slider;
diff --git a/src/index.tsx b/src/index.tsx
index 8d5df82..353cebb 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -1,7 +1,7 @@
 import React from 'react';
 import ReactDOM from 'react-dom/client';
 import './index.css';
-import App from './Geshem';
+import { App } from './Geshem';
 
 console.log()
 
-- 
cgit v1.3.1

