Skip to content

[feat]: Write onSave function for saving events when "Save" is clicked #50

@henrylee746

Description

@henrylee746

Description

Optional feature (not necessary for the MVP) so can be done in later time

The implementation for this can be easy if done with useState - however, this doesn't account for if the user uses different devices (e.g. if they used their PC to save events, they won't be able to see those saved events on their phone).

Therefore, the recording of saved events will have to be done in Prisma

  1. The schema will have to be changed (create model SavedEvent, user model takes in SavedEvents of type SavedEvent[])
  2. Migrate the new schema
  3. Create a server action which saves the id of the event into Prisma
  4. Use useSession() to pull up the user's saved events if logged in

Also may want to add a "Saved" filter where the user can see only their saved events

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requeston holdUnnecessary to work on until after MVP is finished, optional features

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions