Skip to content

Commit

Permalink
feat: add import modal
Browse files Browse the repository at this point in the history
  • Loading branch information
ialexanderbrito committed Apr 5, 2022
1 parent 353d0db commit 56824f8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/pages/Home/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import Modal from 'react-modal';

import { Barbeiro } from 'pages/Barbeiro';
import { Cliente } from 'pages/Cliente';
import { ReportBug } from 'pages/ReportBug';

import { FloatingButton } from 'components/FloatingButton';
import { Header } from 'components/Header';
Expand All @@ -9,6 +12,7 @@ import { useTheme } from 'contexts/Theme';
import { useUser } from 'contexts/User';

import { useAuth } from 'hooks/useAuth';
import { useReport } from 'hooks/useReport';

import { css } from 'styles/calendar.styles';

Expand All @@ -18,11 +22,12 @@ export function Home() {
const { user } = useAuth();
const { theme } = useTheme();
const { verificaLoginGoogleEOcupacao, verificaOcupacao } = useUser();
const { openModal, closeModal, customStyles, modalIsOpen } = useReport();

return (
<div className={styles.home} data-theme={theme}>
<style>{css}</style>
<FloatingButton />
<FloatingButton onClick={openModal} />
<Header
logo
default
Expand All @@ -31,6 +36,10 @@ export function Home() {
avatar={user?.user_metadata.name}
/>

<Modal isOpen={modalIsOpen} onRequestClose={closeModal} style={customStyles}>
<ReportBug />
</Modal>

<div className={styles.container}>
{verificaLoginGoogleEOcupacao() && <VerificacaoOcupacao />}
{verificaOcupacao('cliente') && <Cliente />}
Expand Down

0 comments on commit 56824f8

Please sign in to comment.