27cdd1c954
* tidy: added eslintrc and prettierrc rules * tidy: formated the files via ‚yarn format‘ * import sort improvements * format script regex fix * replace eslint import severity to warning * remove staged file Co-authored-by: Gustavo Mauricio <gustavo.mauricio58@gmail.com>
24 lines
595 B
TypeScript
24 lines
595 B
TypeScript
import React from 'react'
|
|
|
|
import CreditManager from 'components/CreditManager'
|
|
import Navigation from 'components/Navigation'
|
|
import useCreditManagerStore from 'stores/useCreditManagerStore'
|
|
|
|
import styles from './Layout.module.css'
|
|
|
|
const Layout = ({ children }: { children: React.ReactNode }) => {
|
|
const isOpen = useCreditManagerStore((s) => s.isOpen)
|
|
|
|
return (
|
|
<div className={styles.background}>
|
|
<Navigation />
|
|
<div className={`${styles.container} relative`}>
|
|
{children}
|
|
{isOpen && <CreditManager />}
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default Layout
|