feat: draggable events

This commit is contained in:
cv
2021-05-06 12:05:21 +02:00
parent 0631dec3d3
commit 4161dd29c8
17 changed files with 408 additions and 209 deletions
+7
View File
@@ -30,6 +30,13 @@ export const requestPatch = async (data) => {
return res;
};
export const requestReorder = async (data) => {
const reorder = 'reorder';
console.log('debug got reorder with payload', data);
const res = await axios.patch(eventsURL + '/' + reorder, data);
return res;
};
export const requestDelete = async (eventId) => {
const res = await axios.delete(eventsURL + '/' + eventId);
return res;
-4
View File
@@ -12,7 +12,6 @@ export const sampleData = {
events: [
{
id: '1',
order: 1,
title: 'Is the internet a fad?',
subtitle: 'It is',
presenter: 'Carlos Valente',
@@ -24,13 +23,11 @@ export const sampleData = {
},
{
id: 0.4849093424577693,
order: 2,
duration: 25*60000,
type: 'delay',
},
{
id: '2',
order: 3,
title: 'Is reddit a dictatorship?',
subtitle: 'It is',
presenter: 'Carlos Valente',
@@ -42,7 +39,6 @@ export const sampleData = {
},
{
id: '3',
order: 4,
title: 'Out of words',
subtitle: '',
presenter: 'Carlos Valente',