From 9b75f52073aeddcd6fc555b1540574b96317c623 Mon Sep 17 00:00:00 2001
From: Shubhangi Choudhary <78342516+shubhangi013@users.noreply.github.com>
Date: Tue, 21 Dec 2021 18:35:55 +0530
Subject: [PATCH] migrated the files to tsx (#4972)
* migrated the files to tsx
* reverted unecessary changes
* reverted unecessary changes to app.css
* fixed the fails
* fixed the fails
---
web/src/js/components/Modal/Modal.jsx | 13 -------------
web/src/js/components/Modal/Modal.tsx | 13 +++++++++++++
.../{ModalLayout.jsx => ModalLayout.tsx} | 8 ++++++--
web/src/js/filt/filt.js | Bin 87312 -> 87386 bytes
4 files changed, 19 insertions(+), 15 deletions(-)
delete mode 100644 web/src/js/components/Modal/Modal.jsx
create mode 100644 web/src/js/components/Modal/Modal.tsx
rename web/src/js/components/Modal/{ModalLayout.jsx => ModalLayout.tsx} (67%)
diff --git a/web/src/js/components/Modal/Modal.jsx b/web/src/js/components/Modal/Modal.jsx
deleted file mode 100644
index 64b61fcce..000000000
--- a/web/src/js/components/Modal/Modal.jsx
+++ /dev/null
@@ -1,13 +0,0 @@
-import * as React from "react"
-import ModalList from './ModalList'
-import { useAppSelector } from "../../ducks";
-
-
-export default function PureModal() {
- const activeModal = useAppSelector(state => state.ui.modal.activeModal)
- const ActiveModal = ModalList.find(m => m.name === activeModal )
-
- return(
- activeModal ? :
- )
-}
diff --git a/web/src/js/components/Modal/Modal.tsx b/web/src/js/components/Modal/Modal.tsx
new file mode 100644
index 000000000..d9a475eb9
--- /dev/null
+++ b/web/src/js/components/Modal/Modal.tsx
@@ -0,0 +1,13 @@
+import * as React from "react"
+import ModalList from './ModalList'
+import { useAppSelector } from "../../ducks";
+
+
+export default function PureModal() {
+ const activeModal : string = useAppSelector(state => state.ui.modal.activeModal)
+ const ActiveModal:(() => JSX.Element) | undefined= ModalList.find(m => m.name === activeModal )
+
+ return(
+ activeModal&&ActiveModal!==undefined ? :
+ )
+}
diff --git a/web/src/js/components/Modal/ModalLayout.jsx b/web/src/js/components/Modal/ModalLayout.tsx
similarity index 67%
rename from web/src/js/components/Modal/ModalLayout.jsx
rename to web/src/js/components/Modal/ModalLayout.tsx
index 387f7ded9..dd21aed08 100644
--- a/web/src/js/components/Modal/ModalLayout.jsx
+++ b/web/src/js/components/Modal/ModalLayout.tsx
@@ -1,10 +1,14 @@
import * as React from "react"
-export default function ModalLayout ({ children }) {
+type ModalLayoutProps = {
+ children: React.ReactNode,
+}
+
+export default function ModalLayout ({ children}: ModalLayoutProps ) {
return (
-
+
{children}
diff --git a/web/src/js/filt/filt.js b/web/src/js/filt/filt.js
index 3b7699362bed6a7183cb5f493de82605a729c8e7..7d496bd4bb8a64caaf213b3d20f64432e77534a2 100644
GIT binary patch
delta 62
zcmbQRiuKki)`l&NktVV_TnbQ-ms+k6l$!2ZQJ|remY-LmuctMAr!k`nCy1k`rKG8|
KJ<^16y8-}FK@x5N
delta 17
Zcmcb$igm&&)`l&NktW+0n=o!y002bO2Jrv@