|
@@ -8,7 +8,7 @@ import { styled } from '@mui/material/styles';
|
|
|
import { Container } from '@mui/system';
|
|
|
import Grid2 from '@mui/material/Unstable_Grid2/Grid2';
|
|
|
|
|
|
-import { actionfindPosts, actionFindUserOne } from '../redux/action';
|
|
|
+import { actionfindPosts, actionFindUserOne, actionFeedFindOne } from '../redux/action';
|
|
|
import { RecipeReviewCard as Card } from './card_feed';
|
|
|
import AboutMe from './aboutMe';
|
|
|
|
|
@@ -20,6 +20,7 @@ const Item = styled(Paper)(() => ({
|
|
|
}))
|
|
|
|
|
|
const myId = ((JSON.parse(atob(localStorage.authToken.split('.')[1]))).sub.id)
|
|
|
+console.log('myId: ', typeof myId)
|
|
|
|
|
|
function Feed({ feed = [], me = {} }) {
|
|
|
|
|
@@ -57,4 +58,15 @@ store.dispatch(actionFindUserOne(myId)) // скорее всего нужно б
|
|
|
|
|
|
const Me = connect(state => ({ me: state?.promise?.UserFindOne?.payload }))(AboutMe)
|
|
|
|
|
|
-export const ReduxFeed = connect(state => ({ feed: state?.promise?.PostsFind?.payload }))(Feed)
|
|
|
+export const ReduxFeed = connect(state => ({ feed: state?.promise?.PostsFind?.payload }))(Feed)
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+// запрос на ленту постов моих подписчиков
|
|
|
+const arr = ["5d6fccfc5fce6722147978f2", "5d66e01dc6a7071408ac1e1c"]
|
|
|
+const sort = -1
|
|
|
+
|
|
|
+store.dispatch(actionFeedFindOne(arr, sort))
|
|
|
+// export const ReduxFeed2 = connect(state => ({ feed: state?.promise?.feed?.payload }))(Feed)
|
|
|
+
|