|
|
@ -3,6 +3,7 @@ import React, {useContext, useState} from 'react';
|
|
|
|
import { useDispatch, useSelector } from 'react-redux';
|
|
|
|
import { useDispatch, useSelector } from 'react-redux';
|
|
|
|
import { addPost, getPosts } from '../actions/post.actions';
|
|
|
|
import { addPost, getPosts } from '../actions/post.actions';
|
|
|
|
import { UidContext } from './AppContext';
|
|
|
|
import { UidContext } from './AppContext';
|
|
|
|
|
|
|
|
import IconeFavor from '../assets/img/logo.png';
|
|
|
|
|
|
|
|
|
|
|
|
const AjoutLien = () => {
|
|
|
|
const AjoutLien = () => {
|
|
|
|
const uid = useContext(UidContext);
|
|
|
|
const uid = useContext(UidContext);
|
|
|
@ -75,9 +76,20 @@ const AjoutLien = () => {
|
|
|
|
</button>
|
|
|
|
</button>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{uid !== null &&
|
|
|
|
{uid !== null &&
|
|
|
|
<button className='button-add-link' onClick={() => setDisplayAdd(true)} >
|
|
|
|
// <button className='button-add-link' onClick={() => setDisplayAdd(true)} >
|
|
|
|
Poster un lien
|
|
|
|
// Poster un lien
|
|
|
|
|
|
|
|
// </button>
|
|
|
|
|
|
|
|
<ul className="wrapperAjout">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<button className="iconFavor" onClick={() => setDisplayAdd(true)}>
|
|
|
|
|
|
|
|
<div className="flexButon">
|
|
|
|
|
|
|
|
{/* <img src={IconeFavor}/> */}
|
|
|
|
|
|
|
|
<span>Poster un lien</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</button>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{displayAdd && (
|
|
|
|
{displayAdd && (
|
|
|
@ -111,7 +123,7 @@ const AjoutLien = () => {
|
|
|
|
value={tag}
|
|
|
|
value={tag}
|
|
|
|
onChange={e => setTag(e.target.value)}
|
|
|
|
onChange={e => setTag(e.target.value)}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
<i type="submit" onClick={handleSubmit}>Add Tag</i>
|
|
|
|
<i type="submit" onClick={handleSubmit}>Ajouter un tag</i>
|
|
|
|
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<ul>
|
|
|
|
{tags.map(t => (
|
|
|
|
{tags.map(t => (
|
|
|
@ -121,7 +133,7 @@ const AjoutLien = () => {
|
|
|
|
|
|
|
|
|
|
|
|
<div id="newPoste-buttonForm">
|
|
|
|
<div id="newPoste-buttonForm">
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<button onClick={() => setDisplayAdd(false)} className="newPoste-btn-cancel" >retour</button>
|
|
|
|
<button onClick={() => setDisplayAdd(false)} className="newPoste-btn-cancel" >Retour</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<button onClick={handlePost} className="newPoste-btn">Poster</button>
|
|
|
|
<button onClick={handlePost} className="newPoste-btn">Poster</button>
|
|
|
|