-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: ✨ add timestamps #173
Conversation
Both timestamps (doctors and institutions) are available. ATM using only doctors.
src/components/Shared/FooterInfo.js
Outdated
<br /> | ||
{t('footer.lastChange')}: <strong>{lastChange()}</strong> | ||
*/} | ||
{t('footer.lastChange')}: <strong>{lastChange(drTs)}</strong> |
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.
Could this be changed to use i18next interpolation for better flexibility in translations?
{t('footer.lastChange')}: <strong>{lastChange(drTs)}</strong> | |
{t('footer.lastChange', { date: new Date(drTs) })} |
or remove the placeholders from translations:
Line 79 in 9473574
"lastChange": "Last data update on {{ date, %A, %B %e, %Y }}" |
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.
sure. I did't know it's possible.
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.
Done. Slightly different as you suggested.
Do not request institutions timestamp - not needed |
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.
Do not request institutions timestamp
src/context/timestampsContext.js
Outdated
const [instTs, setInstTs] = useState(null); | ||
|
||
const drTsRequest = useFetchTs(CSV_URL.DOCTORS_TS); | ||
const instTsRequest = useFetchTs(CSV_URL.INSTITUTIONS_TS); |
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.
I would never request institutions.csv.timestamp
- no need as we only need one timestamp
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.
done.
ATM we don't need institutions timestamp
@jalezi it seems that you have broken date formatting |
ups |
could'n figure out how to use react-i18next to format date
@jalezi why do we not use i18next formatting, like on covid-19 project? |
@lukarenko I think @bananica tried, I have tried. Couldn't figured out. I will try again at some point. Didn't know you want time. It can be also relative like on social |
@lukarenko I guess I figured it out. |
Both timestamps (doctors and institutions) are available.
ATM using only doctors.
Check both languages.
What should we do with institutions ts?