forked from RiseUP/riseup-squad23
agendamentos no incio
This commit is contained in:
parent
8e1fcd9609
commit
a502bbdffe
@ -1,12 +0,0 @@
|
|||||||
import React from 'react';
|
|
||||||
|
|
||||||
function Agendamentos() {
|
|
||||||
return (
|
|
||||||
<div style={{ padding: '2rem', textAlign: 'center' }}>
|
|
||||||
<h1>Página de Agendamentos</h1>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Agendamentos;
|
|
||||||
@ -19,7 +19,7 @@ function Inicio({ setCurrentPage }) {
|
|||||||
|
|
||||||
const fetchAgendamentos = async () => {
|
const fetchAgendamentos = async () => {
|
||||||
try {
|
try {
|
||||||
const res = await fetch("SUA_URL_DA_API_DE_AGENDAMENTOS");
|
const res = await fetch();
|
||||||
const data = await res.json();
|
const data = await res.json();
|
||||||
setAgendamentos(data.data);
|
setAgendamentos(data.data);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -99,7 +99,7 @@ function Inicio({ setCurrentPage }) {
|
|||||||
<span className="action-desc">Ver todos os pacientes</span>
|
<span className="action-desc">Ver todos os pacientes</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="action-button" onClick={() => setCurrentPage('Agendamentos')}>
|
<div className="action-button" onClick={() => setCurrentPage('agendamento')}>
|
||||||
<FaCalendarCheck className="action-icon" />
|
<FaCalendarCheck className="action-icon" />
|
||||||
<div className="action-info">
|
<div className="action-info">
|
||||||
<span className="action-title">Agendamentos</span>
|
<span className="action-title">Agendamentos</span>
|
||||||
@ -124,7 +124,7 @@ function Inicio({ setCurrentPage }) {
|
|||||||
<div className="no-appointments-content">
|
<div className="no-appointments-content">
|
||||||
<FaCalendarCheck className="no-appointments-icon" />
|
<FaCalendarCheck className="no-appointments-icon" />
|
||||||
<p>Nenhum agendamento para hoje</p>
|
<p>Nenhum agendamento para hoje</p>
|
||||||
<button className="manage-button" onClick={() => setCurrentPage('Agendamentos')}>
|
<button className="manage-button" onClick={() => setCurrentPage('agendamento')}>
|
||||||
Gerenciar Agendamentos
|
Gerenciar Agendamentos
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user