Create Appointment works

This commit is contained in:
Riccardo
2021-01-06 11:09:19 +01:00
parent 07cbbf12de
commit f25a3055e5
10 changed files with 150 additions and 76 deletions

View File

@@ -0,0 +1,36 @@
import React from 'react';
import { useQuery, gql } from '@apollo/client';
export const APPOINTMENTS_QUERY = gql`
{
allAppointments{
title
description
start
end
}
}
`;
var EventsList = [];
const Events = () => {
const { data } = useQuery(APPOINTMENTS_QUERY);
// if (data !== undefined) {
console.log("Data:", data.allAppointments);
EventsList = data.allAppointments;
return (
EventsList
);
// } else {
// return (
// EventsList
// )
// }
};
export default EventsList;