diff --git a/frontend/src/constants/ApiConstants.js b/frontend/src/constants/ApiConstants.js new file mode 100644 index 0000000..d677507 --- /dev/null +++ b/frontend/src/constants/ApiConstants.js @@ -0,0 +1,4 @@ + +export const RADIOSTATION_URL = "http://localhost:8080/api"; + +export const CREATE_RADIOSTATION_ENDPOINT = "/radio-stations"; \ No newline at end of file diff --git a/frontend/src/screens/CreateStation.jsx b/frontend/src/screens/CreateStation.jsx index 8c61b90..eab99fa 100644 --- a/frontend/src/screens/CreateStation.jsx +++ b/frontend/src/screens/CreateStation.jsx @@ -1,12 +1,14 @@ import React, { useState } from 'react'; +import { createStation } from '../utils/Stations'; + +// I UNDERSTAND THIS!! --Noah function CreateStation() { - const [joinMethod, setJoinMethod] = useState(''); - const [password, setPassword] = useState(''); + const [name, setName] = useState(""); + const [description, setDescription] = useState(""); const handleCreateStation = () => { - // Handle station creation logic here - console.log('Creating station with password:', password); + createStation(name, description); }; return ( @@ -16,40 +18,13 @@ function CreateStation() {
-
-

How should people be able to join your station?

- -
- -
- - {joinMethod === 'password' && ( -
- - setPassword(e.target.value)} - placeholder="Enter station password" - /> -
- )} -
+