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

Replaced use axios with use query on GeneralIntoStep container #3134

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

PavloButynets
Copy link
Contributor

@PavloButynets PavloButynets commented Jan 22, 2025

Replaced useAxios with useQuery on the GeneralIntoStep container, fixed tests and removed unnecessary isUserFetched and setIsUserFetched

@PavloButynets PavloButynets self-assigned this Jan 22, 2025
if (userResponse) {
updateUserName(userResponse)
}
}, [userResponse])
Copy link
Contributor

Choose a reason for hiding this comment

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

We need to discuss problems with useForm hook on our next daily call, remind me please about it

@@ -1,8 +1,10 @@
import { AxiosResponse } from 'axios'
import { URLs } from '~/constants/request'
import { axiosClient } from '~/plugins/axiosClient'
import { Course, CourseForm, GetCoursesParams } from '~/types'
import { Course, CourseForm, GetCoursesParams, ItemsWithCount } from '~/types'
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
import { Course, CourseForm, GetCoursesParams, ItemsWithCount } from '~/types'
import type { Course, CourseForm, GetCoursesParams, ItemsWithCount } from '~/types'

parameters: { id },
searchParameters: {
role: userRole,
isEdit: isEdit !== undefined ? isEdit.toString() : undefined
Copy link
Contributor

Choose a reason for hiding this comment

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

I saw the same in one of your previous PRs, did I missed something?

Suggested change
isEdit: isEdit !== undefined ? isEdit.toString() : undefined
isEdit: isEdit?.toString() ?? undefined

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, I forgot to fix it in this PR too, but I'll first merge the previous PR and then do a rebase

Copy link
Contributor

Choose a reason for hiding this comment

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

You need to rebase your other branch and then do rebase on this branch. Don't use merge, please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(SP: ) Replace useAxios with useQuery on the GeneralInfoStep container
2 participants