Skip to content

Commit

Permalink
fancy shmancy ui
Browse files Browse the repository at this point in the history
  • Loading branch information
ivozilkenat committed Apr 6, 2024
2 parents a5d7a05 + 56751b7 commit 29f03fa
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 5 deletions.
4 changes: 2 additions & 2 deletions client/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import React from "react";
import "./App.css"
import MapComponent from './components/RealtimeMap';
import Banner from "./components/Banner";
import InputBox from "./components/inputBox";
import RouteSearchDiv from "./components/RouteSearchDiv";

function App() {

return (
<div className="App">
<Banner />
<InputBox />
<MapComponent />
<RouteSearchDiv />
</div>
);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState } from 'react';

function App() {
function InputBox() {
const [input1, setInput1] = useState('');
const [input2, setInput2] = useState('');
const [suggestedStations1, setSuggestedStations1] = useState([]);
Expand Down Expand Up @@ -111,4 +111,4 @@ function App() {
);
}

export default App;
export default InputBox;
8 changes: 8 additions & 0 deletions client/src/components/RealtimeMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,14 @@ function RealtimeMap() {
{item.name}
</div>
<div className="popup-info">
<div className="info-line">
<span><span className="info-label">Transportation mode(s):</span> {
Object.entries(item.products)
.filter(([key, value]) => value)
.map(([key]) => key)
.join(', ')
}</span>
</div>
<div className="info-line">
<span className="info-label">Absolute Utilization:</span> {item.utilization.abs !== null ? item.utilization.abs : 'null'}
</div>
Expand Down
10 changes: 10 additions & 0 deletions client/src/components/RouteSearchDiv.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React, { useState } from 'react';
import InputBox from "./InputBox";

function RouteSearchDiv() {
return (
<InputBox />
);
}

export default RouteSearchDiv;
2 changes: 1 addition & 1 deletion client/src/components/VehicleIcons.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export function getColor(products) {
return "red";
} else if (products.tram) {
return "blue";
} else if (products.bus) {
} else if (products.suburban) {
return "yellow";
} else if (products.ferry) {
return "purple";
Expand Down

0 comments on commit 29f03fa

Please sign in to comment.