-
Notifications
You must be signed in to change notification settings - Fork 1
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(save feature): add save feature to the events #123
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.
is there a possibility we use the same join functionality to do this without creating a whole structure ?
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.
great work ! mostly clean, i've left some optimizition suggestion, feel free to adjust to them or not ! great work
don''t forget to remove the console logs x)
@@ -91,6 +112,9 @@ function EventCard({ TheEvent }) { | |||
<div className='flex justify-center text-[16px] shadow-md items-center bg-emerald-100 md:w-[30%] w-[50%] rounded-md lg:text-lg font-semibold'> | |||
{formattedDate} | |||
</div> | |||
<div className='text-xl'> |
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.
you didn't have to fetch the user document, you could"ve just used the context
userDoc={user.uid), this way you'll be making full use of the user context, actually you won't have to pass it even as an argument, you'll just call the useUser in the save event componenet, userContext was created for this reason
that way, code will be shorteer, and remember the first rule about useEffect," if you can avoid using use effect don't use it" - creater of 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.
that's what i'd call clean code <3
@@ -301,6 +302,12 @@ function EventDetails() { | |||
backgroundImage: `url(${eventDisplay.image})`, | |||
}} | |||
> | |||
<div className='absolute text-2xl z-10 -top-24 left-2 group-hover:top-0 rounded-b-sm transition-all duration-300 bg-slate-200 py-2 px-1 opacity-0 group-hover:opacity-100'> | |||
<EventsSave |
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.
same thing, you onlly need to be passing the event id
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.
well it's nice to set it to avoid "!eventsSave", but the upload methode creates a new field if it doesn't exsite
none the less better then regret and good work, i didn't check the preview onlly checking the code
he's on the right track, just small optimization that's all, limit fetching and prop drilling |
#121
Related Issue