Skip to content

Master add rtk query#29

Open
bzhn-zfort wants to merge 2 commits intomasterfrom
master-add-rtk-query
Open

Master add rtk query#29
bzhn-zfort wants to merge 2 commits intomasterfrom
master-add-rtk-query

Conversation

@bzhn-zfort
Copy link
Contributor

No description provided.

@bzhn-zfort bzhn-zfort changed the title feat: switch to RTK Query Master add rtk query Aug 25, 2025
Copy link

@artemkostiukov artemkostiukov left a comment

Choose a reason for hiding this comment

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

looks good

isRefreshing = false;
processRefreshQueue(false);
await UserAuthService.logout();
window.location.pathname = '/';
Copy link
Member

Choose a reason for hiding this comment

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

Use React Router's navigation or dispatch a logout action instead.

isRefreshing = false;
processRefreshQueue(false);
await UserAuthService.logout();
window.location.pathname = '/';
Copy link
Member

Choose a reason for hiding this comment

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

Use React Router's navigation or dispatch a logout action instead.


const LogoutScreen: React.FunctionComponent = () => {
const dispatch = useDispatch();
console.log('logout screen');
Copy link
Member

Choose a reason for hiding this comment

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

Remove debug console

if (res !== false) {
onSuccess && onSuccess();
try {
const res = await withErrors<LoginFormData>(login(data).unwrap(), setError);
Copy link
Member

Choose a reason for hiding this comment

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

The withErrors function now returns Promise.reject(error) instead of false, but the code still checks for false. This will always call onSuccess() after a catch block runs

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

Comments