diff --git a/frontend/src/constants/ApiConstants.js b/frontend/src/constants/ApiConstants.js index d677507..c7fd4b7 100644 --- a/frontend/src/constants/ApiConstants.js +++ b/frontend/src/constants/ApiConstants.js @@ -1,4 +1,4 @@ - export const RADIOSTATION_URL = "http://localhost:8080/api"; -export const CREATE_RADIOSTATION_ENDPOINT = "/radio-stations"; \ No newline at end of file +export const CREATE_RADIOSTATION_ENDPOINT = "/radio-stations"; +export const LIST_RADIOSTATIONS_ENDPOINT = "/radio-stations"; diff --git a/frontend/src/screens/CreateStation.jsx b/frontend/src/screens/CreateStation.jsx index eab99fa..469dfc3 100644 --- a/frontend/src/screens/CreateStation.jsx +++ b/frontend/src/screens/CreateStation.jsx @@ -1,5 +1,5 @@ import React, { useState } from 'react'; -import { createStation } from '../utils/Stations'; +import { createStation } from '../utils/StationsCreate'; // I UNDERSTAND THIS!! --Noah diff --git a/frontend/src/screens/JoinStation.jsx b/frontend/src/screens/JoinStation.jsx index 3bb3302..2f3e758 100644 --- a/frontend/src/screens/JoinStation.jsx +++ b/frontend/src/screens/JoinStation.jsx @@ -1,17 +1,22 @@ -import React, { useState } from 'react'; -import { useNavigate } from 'react-router-dom'; +import React, { useEffect, useState } from "react"; +import { useNavigate } from "react-router-dom"; +import { getStations } from "../utils/GetStations"; function JoinStation() { - const [verifyMethod, setVerifyMethod] = useState(''); - const [password, setPassword] = useState(''); const navigate = useNavigate(); + const [stations, setStations] = useState([]); - const handleJoinStation = () => { - console.log('Joining station with password:', password); - // Redirect to station page after joining - navigate('/station'); + const handleJoinStation = (stationID) => { + console.log("Joining station with ID:" + stationID); + navigate("/station"); }; + useEffect(() => { + console.log("Test"); + + getStations(getStations()); + }, []); + return (