-
Notifications
You must be signed in to change notification settings - Fork 1
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
Добро пожаловать, или посторонним вход воспрещён (часть 2) #11
Conversation
return <Navigate state={{ from: location }} to={AppRoute.Login} />; | ||
} | ||
|
||
// return ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Удалить комментарий
import { UserData } from '../types/user-data'; | ||
import { AuthData } from '../types/auth-data'; | ||
import { saveToken } from '../service/token'; | ||
import { TUser } from '../types/user'; | ||
|
||
export const fetchOffersAction = createAsyncThunk<void, undefined, { | ||
export const fetchOffersAction = createAsyncThunk<OfferPreviews[], undefined, { | ||
dispatch: AppDispatch; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Вынести типизацию Thunk Api в отдельный тип и подключать его здесь
import { OfferPreviews } from '../../types/offer-preview'; | ||
|
||
type TInitialState = { | ||
status: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Типизация должна быть RequestStatus
|
||
type TInitialState = { | ||
status: string; | ||
isOfferDataLoadingStatus: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Если используешь RequestStatus это поле и подобные ему не нужны
|
||
type TInitialState = { | ||
status: string; | ||
isOfferDataLoadingStatus: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Это срез пользователя при чем тут Offer, вообще лучше убрать это поле и менять status
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Принято
🎓 Добро пожаловать, или посторонним вход воспрещён (часть 2)