Skip to content
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

2031: Refactor getDate method #2512

Merged
merged 5 commits into from
Oct 11, 2023
Merged

2031: Refactor getDate method #2512

merged 5 commits into from
Oct 11, 2023

Conversation

ztefanie
Copy link
Member

Short description

The getDate method has duplicate code in web and native. I moved the shared logic of choosing the right icon to the api-client. Only selecting the platform specific icons stays in web and native.

Copy link
Member

@steffenkleinle steffenkleinle left a comment

Choose a reason for hiding this comment

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

Nice refactoring, thanks :)

api-client/src/models/DateModel.ts Outdated Show resolved Hide resolved
api-client/src/models/DateModel.ts Outdated Show resolved Hide resolved
native/src/components/EventListItem.tsx Outdated Show resolved Hide resolved
native/src/components/EventListItem.tsx Outdated Show resolved Hide resolved
web/src/components/EventListItem.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@LeandraH LeandraH left a comment

Choose a reason for hiding this comment

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

I'm getting the following error when running yarn start in /web:
WARNING in ../../api-client/src/index.ts 61:0-68
export 'DateIcon' (reexported as 'DateIcon') was not found in './models/DateModel' (possible exports: default)

@ztefanie
Copy link
Member Author

I'm getting the following error when running yarn start in /web: WARNING in ../../api-client/src/index.ts 61:0-68 export 'DateIcon' (reexported as 'DateIcon') was not found in './models/DateModel' (possible exports: default)

Thanks for testing again, fixed it.
I think a lot of our errors happen, when we just change small things after other team members reviewed and tested. But, this error was catched by e2e tests.

@LeandraH
Copy link
Contributor

Nice! Tested in emulated iOS and Firefox

@ztefanie ztefanie enabled auto-merge October 11, 2023 06:40
@ztefanie ztefanie merged commit 94e21ee into main Oct 11, 2023
4 checks passed
@ztefanie ztefanie deleted the 2031-refactor-get-date-method branch October 11, 2023 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants