[ ] Extend shared\ui, add common components with ccs/scss modules
[ ] Add pagination component
[x] #3
[ ] Add tab component #11
Entities
[x] Add types to the model/api. Almost all layers use types from shared\api #7
article
[ ] entities\article\ui\article-editor minimum layer is features, it should fit good in the widgets.
[ ] entities\article\ui\articles-list replace hasNextPage with more generic slot. The component looks like widget, it serve too many inner states, probably need to be moved to widgets
[x] entities\article\ui\favorite-button remove it. Should be shared/ui/button #3
[x] entities\article\ui\load-more-button remove it. Should be shared/ui/button #3
profile
[x] src\entities\profile\ui\follow-button remove it. Should be shared/ui/button #3
Features
[ ] useMutation should has mutationKey and mutationFn like features\session\create\api\createUser.ts
[ ] Update api methods naming - createArticle.ts -> useCreateArticle
[ ] There are several mutations that probably need an optimistic update
article
We should use a more elegant way of implementing a favorite/unwanted feature
[ ] features\article\favorite contain base api that uses for favorite-article and unfavorite-article`, I think we have to separate logic
[x] features\article\favorite\toggle-favorite-article contain ui's from favorite-article and unfavorite-article, should move to upper layer #3
profile the same as features\article but for follow
session
[ ] Add msw handlers (including jwt)
[ ] Add tests
Widgets
[ ] widgets\current-article-editor should fetch article in the editor page and pass article as prop to the widget
[ ] widgets\global-articles-list and widgets\user-articles-list add pagination (user have to choose between infinity scroll and pagination)
Pages
[ ] home and profile pages implement tab logic with use State, we could create shared/tab component for this #11
[ ] Add hook to check is user guest, author, to avoid ArticlePagetsx 43 - 46
[ ] pages\editor should fetch article
[ ] pages\layouts\main-layout add header and footer components and import here
App
[x] app\providers\RouterProvider.tsx move guards to session ui #10
TODO
Global
Shared
lib
toapi
#7shared\ui
, add common components with ccs/scss modulesEntities
article
entities\article\ui\article-editor
minimum layer isfeatures
, it should fit good in thewidgets
.entities\article\ui\articles-list
replacehasNextPage
with more generic slot. The component looks like widget, it serve too many inner states, probably need to be moved towidgets
entities\article\ui\favorite-button
remove it. Should beshared/ui/button
#3entities\article\ui\load-more-button
remove it. Should beshared/ui/button
#3profile
src\entities\profile\ui\follow-button
remove it. Should beshared/ui/button
#3Features
mutationKey
andmutationFn
likefeatures\session\create\api\createUser.ts
createArticle.ts
->useCreateArticle
article
We should use a more elegant way of implementing a favorite/unwanted feature
features\article\favorite
contain base api that uses forfavorite-article
and unfavorite-article`, I think we have to separate logicfeatures\article\favorite\toggle-favorite-article
contain ui's fromfavorite-article
andunfavorite-article
, should move to upper layer #3profile the same as
features\article
but forfollow
session
Widgets
widgets\current-article-editor
should fetch article in theeditor
page and pass article as prop to the widgetwidgets\global-articles-list
andwidgets\user-articles-list
add pagination (user have to choose between infinity scroll and pagination)Pages
home
andprofile
pages implement tab logic with use State, we could createshared/tab
component for this #11ArticlePagetsx
43 - 46pages\editor
should fetch articlepages\layouts\main-layout
addheader
andfooter
components and import hereApp
app\providers\RouterProvider.tsx
move guards to session ui #10