-
Notifications
You must be signed in to change notification settings - Fork 7
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
add ClientEventTime #245
base: develop
Are you sure you want to change the base?
add ClientEventTime #245
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
@@ -0,0 +1,34 @@ | |||
'use client'; | |||
//import react | |||
import React from 'react'; |
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.
unnecessary import and comment
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone, | ||
}); | ||
|
||
//resturn span element that dispalys local start and end time |
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.
typos
) : ( | ||
<> - {format(event.endTime, 'E, MMM d, p')}</> | ||
)} | ||
{/* Use the ClientEventTime component here */} |
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.
unnecessary comment
const localStartTime = new Date(startTime).toLocaleString(undefined, { | ||
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone, | ||
}); | ||
//same | ||
const localEndTime = new Date(endTime).toLocaleString(undefined, { | ||
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone, | ||
}); |
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.
not sure if this is necessary since it's a client component, you can play with it once it builds on vercel.
Added a component "ClientEventTime" and integrated it into the EventCard component