Skip to content

Commit

Permalink
small tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
mayabaxx committed Oct 20, 2023
1 parent 738d6db commit 80331dd
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 33 deletions.
6 changes: 1 addition & 5 deletions ui-display/frontend-app/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
border: 1px solid #454545;
background: var(--lightgreen);
width: 1080px;
/* height: 20%; */
margin: auto;
position: absolute;
bottom: 0px;
Expand All @@ -50,11 +49,9 @@
.shared-div {
position: relative;
width: 100%;
/* height: 20%; */
padding-top: 2.5vh;
display: flex;
justify-content: space-between;
/* border: 1px solid #454545; */
}

.left-widget {
Expand All @@ -65,7 +62,6 @@
align-items: center;
padding-bottom: 0px;
font-family: Nightingale;
/* border: 1px solid #454545; */
}

.right-widget {
Expand All @@ -75,7 +71,6 @@
justify-content: center;
align-items: center;
padding-bottom: 0px;
/* border: 1px solid #454545; */
}

.SuggestedTime-box {
Expand Down Expand Up @@ -136,6 +131,7 @@ p {
justify-items: flex-start;
}

/* specify custom colour palette */
:root {
--purple: #8ea8f6;
--hotpink: #f18eca;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ export default function ClockWidget() {
const [currentTime, setCurrentTime] = useState(new Date());

useEffect(() => {
// refresh every second
const interval = setInterval(() => {
setCurrentTime(new Date());
}, 1000);

// Clean up the interval on component unmount
// Reset the interval on component unmount
return () => clearInterval(interval);
}, []);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,7 @@ import * as Constants from '../Constants';
import './Widgets.css';

export default function SuggestedTimeWidget() {

/* SETTINGS FOR CONFIG:
- how many times to suggest if there's more than 1 appropriate?
- what to display if there are none appropriate?
- SWITCH to next best times instead?
- or explicitly say there's no good times and direct to DIFFERENT widget?
- when there's multiple matches, what do we rank by?
- next nearest time?

- if the week is nearly over, do you treat entries like they wrap to the next
week coming (e.g. on a friday, stuff written on monday becomes NEXT monday),
or just cut the week off after the remaining fri, sat, sun?
- day the week starts? (remember to update Constants file accordingly.
if this is going to change dynamically maybe move that dictionary
to a Utilities file instead).
- should we report how long eveyrbody is free for, i.e. does it span multiple
time slots? or should they just be able to set the minimum number of consecutive
time slots required for it to "count"?
*/
const currentToTimeSlotNum = () => {
const now = new Date();
const hour_slot = now.getHours() * 60 / Constants.TIMESLOT_LEN;
Expand All @@ -45,7 +25,6 @@ export default function SuggestedTimeWidget() {
return prettyDate;
}


const [suggestedTime, setSuggestedTime] = useState("");
const [loading, setLoading] = useState(true);
const baseURL = 'https://localhost:8000/display/';
Expand Down
2 changes: 0 additions & 2 deletions ui-display/frontend-app/src/components/widgets/Widgets.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,3 @@
.BusiestWidget {
font-family: Nightingale;
}


4 changes: 0 additions & 4 deletions ui-display/frontend-app/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,3 @@ root.render(
<App />
</React.StrictMode>
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals

0 comments on commit 80331dd

Please sign in to comment.