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
This commit is contained in:
Shubhangi Choudhary 2021-12-21 18:35:55 +05:30 committed by GitHub
parent efd2980b8a
commit 9b75f52073
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 15 deletions

View File

@ -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 ? <ActiveModal/> : <div/>
)
}

View File

@ -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 ? <ActiveModal/> : <div/>
)
}

View File

@ -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 (
<div>
<div className="modal-backdrop fade in"></div>
<div className="modal modal-visible" id="optionsModal" tabIndex="-1" role="dialog" aria-labelledby="options">
<div className="modal modal-visible" id="optionsModal" tabIndex={-1} role="dialog" aria-labelledby="options">
<div className="modal-dialog modal-lg" role="document">
<div className="modal-content">
{children}

Binary file not shown.