Added MIT License
Added README as basis for EPQ explanation Added PAPERWORK as basis for Project Proposal Form
This commit is contained in:
parent
c646758e63
commit
e7a64d07f4
5 changed files with 111 additions and 48 deletions
|
@ -9,7 +9,16 @@ export const MessageContainer = (
|
|||
content,
|
||||
timeMillis,
|
||||
}: Message
|
||||
): React.ReactElement<{ sender: string; text: string; }> => {
|
||||
): React.ReactElement<Message> => {
|
||||
const dateTime: Date = new Date(timeMillis);
|
||||
return (<p>[{dateTime.toLocaleString(Intl.DateTimeFormat().resolvedOptions().timeZone)}] Message from {fromUserId}: {content}</p>);
|
||||
/* FIXED funny error
|
||||
* DESCRIPTION
|
||||
* The line below was
|
||||
* return (<p>[{dateTime.toLocaleString(Intl.DateTimeFormat().resolvedOptions().timeZone)}]...</p>)
|
||||
* The line incorrectly generated a value of "UTC" as the parameter to toLocaleString()
|
||||
* While "UTC" is an accepted string value, in EEST, aka. "Europe/Athens" timezone string is not an acceptable parameter.
|
||||
* This caused the return statement to fail, and the message fails to render, despite it being correctly committed to the db.
|
||||
* Funny clown moment 🤡
|
||||
*/
|
||||
return (<p>[{dateTime.toLocaleString()}] Message from {fromUserId}: {content}</p>);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue