Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: refine events #204

Merged
merged 11 commits into from
May 18, 2024
Merged

fix: refine events #204

merged 11 commits into from
May 18, 2024

Conversation

GustaveCharles
Copy link
Collaborator

@GustaveCharles GustaveCharles commented May 18, 2024

What I did

I did a few things related to the Event type and Event loading:

  • Remove the Date type on the events. This is done in order for the event to be serializable and thus be able to be passed as props in some specific screens. Indeed, a React Date is not serializable.
  • make the events load once added
  • add a list of participants to the event type
  • add the creator of the event in the event type

How I did it

  • I added a hook for refreshing the page on a swipe down from the user.
  • When an event is loaded or fetched from the database, it is a string in the ISO format. When we want to display it, we create a Date object. I had to change the query selector too.

How to verify it

For the swipe down, you can go to the Home page, create an event, and then swipe down as in the video. This should automatically display your event.

Demo video

[

Enregistrement.de.l.ecran.2024-05-18.a.16.19.56.1.mov

](url)

Pre-merge checklist

The changes I have introduced:

  • work correctly
  • do not break other functionalities
  • work correctly on Android
  • are fully tested

@GustaveCharles GustaveCharles linked an issue May 18, 2024 that may be closed by this pull request
@Aidasvenc
Copy link
Collaborator

Could you explain the reason why you needed to change the Data type? You could also add it to the PR description for clarity

Copy link
Collaborator

@Aidasvenc Aidasvenc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice visual changes! Just some minor details remain to be changed and it will be good

@GustaveCharles
Copy link
Collaborator Author

Could you explain the reason why you needed to change the Data type? You could also add it to the PR description for clarity

Sure, I've just added some info

Copy link

@GustaveCharles GustaveCharles marked this pull request as ready for review May 18, 2024 21:26
@GustaveCharles GustaveCharles changed the title fix: date in database is not stored as Date anymore fix: refine events May 18, 2024
Copy link
Collaborator

@Fyuryy Fyuryy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@GustaveCharles GustaveCharles merged commit c6331e7 into main May 18, 2024
3 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refine Events
3 participants