Merge remote-tracking branch 'origin/master'
continuous-integration/drone/push Build encountered an error
Details
continuous-integration/drone/push Build encountered an error
Details
# Conflicts: # Site Web/client/src/components/AjoutLien.js # Site Web/client/src/components/Post/NouveauDisplayPosts.js # Site Web/client/src/pages/Profil.js # Site Web/client/src/pages/Trends.jsmaster
commit
02ccfd329b
@ -0,0 +1,32 @@
|
||||
import { current } from '@reduxjs/toolkit';
|
||||
import React, { useEffect, useState, useContext } from 'react';
|
||||
import { useDispatch, useSelector } from 'react-redux';
|
||||
import { getPosts } from '../../../actions/post.actions';
|
||||
import { isEmpty } from "../../Utils";
|
||||
import Post from '../PostNouvelleAffichage';
|
||||
import { UidContext } from '../../AppContext';
|
||||
|
||||
const DiplayPostDossier = () => {
|
||||
const postsData = useSelector((state) => state.post.post);
|
||||
const uid = useContext(UidContext);
|
||||
const dispatch = useDispatch();
|
||||
useEffect(() => {
|
||||
dispatch(getPosts());
|
||||
},[dispatch])
|
||||
|
||||
|
||||
return (
|
||||
<div>
|
||||
<ul>
|
||||
{!isEmpty(postsData[0]) &&
|
||||
postsData.map((post) => {
|
||||
if(post.postedId === uid){
|
||||
return <Post post={post} key={post._id}/>
|
||||
}
|
||||
})}
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default DiplayPostDossier;
|
@ -0,0 +1,33 @@
|
||||
import { current } from '@reduxjs/toolkit';
|
||||
import React, { useEffect, useState, useContext } from 'react';
|
||||
import { useDispatch, useSelector } from 'react-redux';
|
||||
import { getPosts } from '../../../actions/post.actions';
|
||||
import { isEmpty } from "../../Utils";
|
||||
import Post from '../PostNouvelleAffichage';
|
||||
import { UidContext } from '../../AppContext';
|
||||
|
||||
const DisplayPostLikeProfil = () => {
|
||||
const postsData = useSelector((state) => state.post.post);
|
||||
const uid = useContext(UidContext);
|
||||
const dispatch = useDispatch();
|
||||
useEffect(() => {
|
||||
dispatch(getPosts());
|
||||
},[dispatch])
|
||||
|
||||
|
||||
return (
|
||||
<div>
|
||||
<ul>
|
||||
{!isEmpty(postsData[0]) &&
|
||||
postsData.filter(post => post.likers.includes(uid))
|
||||
.map((post) => {
|
||||
return <Post post={post} key={post._id}/>
|
||||
})
|
||||
}
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default DisplayPostLikeProfil;
|
@ -0,0 +1,31 @@
|
||||
import { current } from '@reduxjs/toolkit';
|
||||
import React, { useEffect, useState, useContext } from 'react';
|
||||
import { useDispatch, useSelector } from 'react-redux';
|
||||
import { getPosts } from '../../../actions/post.actions';
|
||||
import { isEmpty } from "../../Utils";
|
||||
import Post from '../PostNouvelleAffichage';
|
||||
import { UidContext } from '../../AppContext';
|
||||
|
||||
const NouveauDisplayPosts = () => {
|
||||
const postsData = useSelector((state) => state.post.post);
|
||||
const uid = useContext(UidContext);
|
||||
const dispatch = useDispatch();
|
||||
useEffect(() => {
|
||||
dispatch(getPosts());
|
||||
},[dispatch])
|
||||
|
||||
return (
|
||||
<div>
|
||||
<ul>
|
||||
{!isEmpty(postsData[0]) &&
|
||||
postsData.map((post) => {
|
||||
if(post.postedId === uid){
|
||||
return <Post post={post} key={post._id}/>
|
||||
}
|
||||
})}
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default NouveauDisplayPosts;
|
@ -1,11 +1,11 @@
|
||||
#listeNotif{
|
||||
margin: 2%;
|
||||
margin-left: 8%;
|
||||
margin-left: 20%;
|
||||
padding:1%;
|
||||
border-color: $color-5;
|
||||
border-style:solid;
|
||||
border-width: 0.3px;
|
||||
min-width: 410px;
|
||||
width: 84%;
|
||||
width: 60%;
|
||||
background: $color-8;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue