refract: cleanup server call constants

This commit is contained in:
cv
2021-05-16 22:41:43 +02:00
parent b42710a972
commit 8162c622a6
8 changed files with 46 additions and 60 deletions
+3 -2
View File
@@ -14,12 +14,13 @@ import {
Button,
Textarea,
} from '@chakra-ui/react';
import { fetchEvent, postEvent, eventNamespace } from 'app/api/eventApi';
import { fetchEvent, postEvent } from 'app/api/eventApi';
import { useEffect, useState } from 'react';
import { useFetch } from 'app/hooks/useFetch';
import { EVENT_TABLE } from 'app/api/apiConstants';
export default function SettingsModal(props) {
const { data, status, isError } = useFetch(eventNamespace, fetchEvent);
const { data, status, isError } = useFetch(EVENT_TABLE, fetchEvent);
const [formData, setFormData] = useState({
title: '',
url: '',