Skip to content

Commit

Permalink
feat: add horario
Browse files Browse the repository at this point in the history
  • Loading branch information
ialexanderbrito committed Apr 9, 2022
1 parent aece97d commit 379e8e6
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions src/pages/Barbeiro/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function Barbeiro() {
getFirstCliente,
} = useUser();

const { visible, setVisible, modalIsOpen, openModal, closeModal, customStyles } = useBarbeiro();
const { visible, setVisible, modalIsOpen, openModal, closeModal, customStyles, date } = useBarbeiro();

return (
<>
Expand All @@ -47,6 +47,7 @@ export function Barbeiro() {
Ocultar calendário
</button>
</div>
<div className={styles.hourContainer}>{date?.toLocaleTimeString()}</div>
<div className={styles.calendar}>
<DayPicker
mode="single"
Expand All @@ -67,17 +68,19 @@ export function Barbeiro() {
</div>
</>
) : (
<div className={styles.containerCalendar}>
<button
className={styles.button}
type="button"
onClick={() => {
setVisible(!visible);
}}
>
Exibir calendário
</button>
</div>
<>
<div className={styles.containerCalendar}>
<button
className={styles.button}
type="button"
onClick={() => {
setVisible(!visible);
}}
>
Exibir calendário
</button>
</div>
</>
)}
<div className={styles.list}>
<Modal isOpen={modalIsOpen} onRequestClose={closeModal} style={customStyles}>
Expand Down

0 comments on commit 379e8e6

Please sign in to comment.