Comments (6)
Can you check the page source and add more info about this? Obviously it's not supposed to say open, but is this hardcoded or fetched dynamically?
from ocfstatic.
The status is fetched dynamically.
From my understanding, there doesn't seem to be any logic to determine if the current time has passed closing time. The conditional statement only asks if the array, this.hours, has a length, which is always true unless there are no hours for that day. On Sunday, the status is "Closed" as it should be because this.hours has no length for that day.
from ocfstatic.
Very interesting, I guess that was thrown together as a placeholder. Thanks for catching this, I'm surprised this wasn't raised earlier!
from ocfstatic.
Wasn't there still some weird behavior going on with that? I think we saw yesterday at the meeting it wasn't quite working as expected
from ocfstatic.
Yup, I figured out the issue but I'm not sure what the best way to fix it is. The problem is that sometimes this.hours isn't updated with the times the lab is open. That's why it says "Today's hours: []" since the default value for this.hours is []. Right now, I have an if statement that defaults to having the lab be closed if this happens.
from ocfstatic.
In that case, your code should be fine and you were right to close this issue. Creating a separate issue to address the fact that this.hours isn't updated,
from ocfstatic.
Related Issues (20)
- Streamline the homepage HOT 1
- Streamline the Homepage
- Use React HOT 8
- Another hydration issue on aboutpage HOT 1
- this.hours sometimes isn't updated
- Add photos on Officers page
- Decide what to do with all those add to staff PRs HOT 11
- Refactor Gridsome Out HOT 2
- Hide create account button on homepage when user is signed in
- Change Password Form Color/Messages
- Link to lab hours page from home page HOT 1
- Fix accessibility issues
- Add legacy URL redirects HOT 3
- Extract docs to their own repo HOT 7
- Menu bar is not aria compliant HOT 2
- Staff Hours Calendar
- About Page HOT 4
- Fix Broken Links on Homepage HOT 1
- Fix Docs Homepage
- Discussion: Announcements HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ocfstatic.