-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/esckan 51 #37
Conversation
Feature/esckan-55
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is good enough to be approved right now given the context explained by Dario
setData(jsonData); | ||
}) | ||
.catch((error) => console.error('Error fetching data:', error)); | ||
const dataToPull = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion (non-blocking): Move this useEffect logic into a service file
request.open( | ||
'GET', | ||
SCKAN_DATABASE_SUMMARY_URL_LATEST + DATABASE_FILES[file], | ||
false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note (non-blocking): Synchronous fetching is usually discouraged because it can lead to a poor user experience.
}, []); | ||
|
||
if (!data || !labels) | ||
if (!loaded) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note (non-blocking): My understanding is that the loader will never show given how we are fetching the data
@@ -77,7 +224,7 @@ const SummaryPage = () => { | |||
Database summary | |||
</Typography> | |||
<Typography variant="body1" color={gray500}> | |||
Last updated on September 15, 2023 | |||
Last updated on May 15, 2024 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note (non-blocking): This update strategy seems very limiting in the sense that would require code changes everytime we want to update the content of this component. We will need to rethink this when we have a more concrete picture and more time
Database connected to the json provided by Fahim - disclaimer, I bypassed the typing requirements since I am not sure this format will last and I don't have time atm if that changes.
CSV generation, this is a poc done for them to test it but again I am not sure it will last and mostly will be subject to changes, reason why the typing has been disabled for the file.