Skip to content

Commit

Permalink
Merge branch 'expo' of github.com:lucashicks1/lambda-deco3801 into expo
Browse files Browse the repository at this point in the history
  • Loading branch information
alilaherty committed Oct 25, 2023
2 parents 95ded9f + c984fad commit 12f58d9
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 15 deletions.
3 changes: 2 additions & 1 deletion db-handler/app/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ def current_to_timeslot() -> str:
"""
now = datetime.now()
time_change = 0
with open("../../time_change.txt", "r") as time:
with open("../time_change.txt", "r") as time:
try:
time_change = int(time.read())
except Exception as _:
print("error")
time_change = 0

now += timedelta(seconds=time_change)
Expand Down
12 changes: 6 additions & 6 deletions ui-display/frontend-app/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,18 @@ function App() {
</div>
<div className="right-widget">
<div className="Joke-box">
<h3>
<h2>
Joke of the day:
</h3>
</h2>
<div>
<p className="Joke-Question">
<h2 className="Joke-Question">
What's a bee's favourite novel?
</p>
</h2>
</div>
<div>
<p className="Joke-Answer">
<h2 className="Joke-Answer">
The Great Gats-bee!
</p>
</h2>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const weatherConditionText = {
const Activities = ({ currentCondition }) => {
// hard code this value for now
if (!currentCondition) {
currentCondition = 'Clouds';
currentCondition = 'Clear';
}
// Get the corresponding activity based on the weatherCondition
const activity = weatherActivities[currentCondition] || 'movie';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class WeatherWidget extends Component {

componentDidMount() {
this.fetchWeatherCondition();
this.refreshInterval = setInterval(this.fetchWeatherCondition, 3600000);
this.refreshInterval = setInterval(this.fetchWeatherCondition, 10000);
}

componentWillUnmount() {
Expand All @@ -19,7 +19,7 @@ class WeatherWidget extends Component {

fetchWeatherCondition = () => {
const apiKey = 'e032a9d4b172cf16a8f75efac7a4470c';
const stLuciaLat = 27.5021;
const stLuciaLat = -27.5021;
const stLuciaLon = 152.9968;
const apiUrl = `https://api.openweathermap.org/data/2.5/weather?lat=${stLuciaLat}&lon=${stLuciaLon}&appid=${apiKey}&units=metric`;

Expand Down
10 changes: 5 additions & 5 deletions vision/make_availabilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
'sunday': [0, 1, 2, 3, 4, 5, 6, 7],
}
jimmy_time_slots = {
'monday': [0, 1, 2, 3, 4, 5, 6, 7],
'tuesday': [0, 1, 2, 3, 4, 5, 6, 7],
'wednesday': [0, 1, 2, 3, 4, 5, 6, 7],
'thursday': [0, 1, 2, 3, 4, 5, 6, 7],
'friday': [0, 1, 2, 3, 4, 5, 6, 7],
'monday': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
'tuesday': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
'wednesday': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
'thursday': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
'friday': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
'saturday': [0, 1, 2, 3, 4, 5, 6, 7],
'sunday': [0, 1, 2, 3, 4, 5, 6, 7],
}
Expand Down

0 comments on commit 12f58d9

Please sign in to comment.