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

feat: refactor favorite items #656

Merged
merged 4 commits into from
Jun 21, 2023
Merged

feat: refactor favorite items #656

merged 4 commits into from
Jun 21, 2023

Conversation

morganridel
Copy link
Contributor

No description provided.

Copy link
Contributor

@pyphilia pyphilia left a comment

Choose a reason for hiding this comment

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

LGTM! I've left minor comments ⭐

cy.intercept(
{
method: HttpMethod.POST,
url: new RegExp(`${API_HOST}/${GET_FAVORITE_ITEMS_ROUTE}/${ID_FORMAT}`),
Copy link
Contributor

Choose a reason for hiding this comment

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

It doesn't have to be changes, but if possible you can use the API endpoints from query-client, so it doesn't break if we change the endpoint route.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The problem is that the endpoint builder takes a UUID to build the url, and the ID_FORMAT is a string

cy.intercept(
{
method: HttpMethod.DELETE,
url: new RegExp(`${API_HOST}/${GET_FAVORITE_ITEMS_ROUTE}/${ID_FORMAT}`),
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above.

package.json Outdated
@@ -147,7 +147,8 @@
"nth-check": "2.1.1",
"react-error-overlay": "6.0.11",
"@types/react": "17.0.62",
"@svgr/webpack": "6.5.1"
"@svgr/webpack": "6.5.1",
"@graasp/sdk": "github:graasp/graasp-sdk#refactor-favorite"
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't forget to change your branches ;)

src/components/common/FavoriteButton.tsx Outdated Show resolved Hide resolved
@morganridel morganridel requested a review from pyphilia June 20, 2023 14:59
@morganridel morganridel merged commit 589f2f6 into main Jun 21, 2023
@morganridel morganridel deleted the refactor-favorite branch June 21, 2023 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants