diff --git a/client/src/features/modals/AliasesModal.jsx b/client/src/features/modals/AliasesModal.jsx new file mode 100644 index 000000000..3962b8768 --- /dev/null +++ b/client/src/features/modals/AliasesModal.jsx @@ -0,0 +1,152 @@ +import { IconButton } from '@chakra-ui/button'; +import { FiPlus, FiMinus } from 'react-icons/fi'; +import { ModalBody } from '@chakra-ui/modal'; +import { Input } from '@chakra-ui/react'; +import { fetchEvent } from 'app/api/eventApi'; +import { useState } from 'react'; +import { useFetch } from 'app/hooks/useFetch'; +import { EVENT_TABLE } from 'app/api/apiConstants'; +import style from './Modals.module.css'; + +export default function AliasesModal() { + const { data, status, isError } = useFetch(EVENT_TABLE, fetchEvent); + const [submitting, setSubmitting] = useState(false); + + const submitHandler = async (event) => { + event.preventDefault(); + // NOTHING HERE YET + }; + + // Hardcoded links for now + // it will need dynamic PORT assignment + const speakerLink = 'http://localhost:4001/speaker'; + const smLink = 'http://localhost:4001/sm'; + const publicLink = 'http://localhost:4001/public'; + const pipLink = 'http://localhost:4001/pip'; + + return ( + <> +
+ > + ); +} diff --git a/client/src/features/modals/AppSettingsModal.jsx b/client/src/features/modals/AppSettingsModal.jsx new file mode 100644 index 000000000..dc2ba12a4 --- /dev/null +++ b/client/src/features/modals/AppSettingsModal.jsx @@ -0,0 +1,146 @@ +import { ModalBody } from '@chakra-ui/modal'; +import { FormLabel, FormControl, Input, Button } from '@chakra-ui/react'; +import { fetchEvent } from 'app/api/eventApi'; +import { useState } from 'react'; +import { useFetch } from 'app/hooks/useFetch'; +import { EVENT_TABLE } from 'app/api/apiConstants'; +import style from './Modals.module.css'; + +export default function AppSettingsModal() { + const { data, status, isError } = useFetch(EVENT_TABLE, fetchEvent); + const [submitting, setSubmitting] = useState(false); + + const submitHandler = async (event) => { + event.preventDefault(); + // NOTHING HERE YET + }; + + return ( + <> + + > + ); +} diff --git a/client/src/features/modals/SettingsModal.jsx b/client/src/features/modals/EventSettingsModal.jsx similarity index 72% rename from client/src/features/modals/SettingsModal.jsx rename to client/src/features/modals/EventSettingsModal.jsx index 7188ab4c3..06e8027cd 100644 --- a/client/src/features/modals/SettingsModal.jsx +++ b/client/src/features/modals/EventSettingsModal.jsx @@ -10,6 +10,7 @@ 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'; +import style from './Modals.module.css'; export default function SettingsModal() { const { data, status, isError } = useFetch(EVENT_TABLE, fetchEvent); @@ -19,6 +20,7 @@ export default function SettingsModal() { publicInfo: '', backstageInfo: '', }); + const [changed, setChanged] = useState(false); const [submitting, setSubmitting] = useState(false); useEffect(() => { @@ -37,40 +39,46 @@ export default function SettingsModal() { setSubmitting(true); await postEvent(formData).then(setSubmitting(false)); + + setChanged(false); + setSubmitting(false); }; return ( <>