remise en place des conversation
This commit is contained in:
parent
779e937310
commit
be16915fbc
@ -1,52 +0,0 @@
|
||||
import React, { useState } from "react";
|
||||
import { Rank } from "../../DataBase/DataRank";
|
||||
import { GrAdd } from "react-icons/gr";
|
||||
|
||||
function AddSelectTag ({number, array, new_name}) {
|
||||
// const [selectCount, setSelectCount] = useState(0);
|
||||
// const [selectValues, setSelectValues] = useState([]);
|
||||
|
||||
// const handleAddSelect = () => {
|
||||
// setSelectCount((selectCount) => selectCount + 1);
|
||||
// setSelectCount((selectValues) =>[...selectValues, `select${selectCount + 1}`] );
|
||||
// };
|
||||
// function insertInArray (number, array, new_name) {
|
||||
// return (
|
||||
// array[number] = new_name
|
||||
// );
|
||||
// };
|
||||
return (
|
||||
<div>
|
||||
{/* <button onClick={handleAddSelect}>Add</button>
|
||||
<div>
|
||||
{selectValues.map((selectName, index) => (
|
||||
<select key={index} name={selectName}>
|
||||
<option value="option1"> option 1</option>
|
||||
<option value="option2"> option 2</option>
|
||||
</select>
|
||||
))}
|
||||
</div> */}
|
||||
{/* <select>
|
||||
{Rank.map((item, index) => {
|
||||
return (
|
||||
<option value="data">{item.name}
|
||||
{/* <input type="checkbox" /> */}
|
||||
{/* </option> */}
|
||||
{/* ) */}
|
||||
{/* // })} */}
|
||||
{/* // </select> */}
|
||||
{/* <div onClick={ () => <insertInArray number={number} array={array} new_name={new_name}/>}> */}
|
||||
<div>
|
||||
<GrAdd/>
|
||||
{/* <h4>{new_name}</h4> */}
|
||||
</div>
|
||||
{/* {number != 0 ? (
|
||||
<div>
|
||||
<p>{array[number]}</p>
|
||||
</div>
|
||||
) : ("")} */}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default AddSelectTag;
|
||||
@ -6,6 +6,7 @@ import DefaultPic from '../../assets/profile.jpg'
|
||||
import api from '../../script/axiosApi';
|
||||
import { motion } from "framer-motion";
|
||||
import Modal from "./Modal";
|
||||
import { NavLink } from "react-router-dom";
|
||||
|
||||
import Message from "./Message"
|
||||
// import Input from "./Input";
|
||||
@ -41,6 +42,9 @@ const UserChat = styled.div `
|
||||
&:hover{
|
||||
background-color: #3e3c61;
|
||||
}
|
||||
&:active {
|
||||
filter: black;
|
||||
}
|
||||
`
|
||||
|
||||
// const SideSpan = styled.span`
|
||||
@ -284,7 +288,7 @@ function Chats(){
|
||||
{conversations.map((c, index ) => {
|
||||
return (
|
||||
<div key={index}
|
||||
onClick={() => setCurrentChat(c)}>
|
||||
onClick={() => setCurrentChat(c)}>
|
||||
<UserChat>
|
||||
<img className="pic-user" src={DefaultPic} alt="User" />
|
||||
<div className="infoSideBar">
|
||||
|
||||
@ -5,7 +5,6 @@ import '../../styles/Messages.css'
|
||||
import { useState } from "react";
|
||||
import { GrAdd } from "react-icons/gr";
|
||||
import { Link } from "react-router-dom";
|
||||
import AddSelectTag from "./AddSelectTag";
|
||||
|
||||
const dropIn = {
|
||||
hidden:{y:"-100vh",
|
||||
@ -45,18 +44,7 @@ const Modal = ({handleClose, text}) => {
|
||||
const selectedOptions = selectTags.map((tag) => tag.selectedOption);
|
||||
setSelectedOptionArray(selectedOptions);
|
||||
}
|
||||
function try_me()
|
||||
{
|
||||
|
||||
for (let i = 0; i < 2; i++)
|
||||
{
|
||||
AddSelectTag();
|
||||
}
|
||||
}
|
||||
let new_name;
|
||||
let number;
|
||||
let array;
|
||||
// const [nickname, setNickname] = useState("");
|
||||
return (
|
||||
<Backdrop>
|
||||
<motion.div
|
||||
@ -99,8 +87,6 @@ const Modal = ({handleClose, text}) => {
|
||||
</div>
|
||||
))
|
||||
}
|
||||
{/* <button onClick={addNewSelectedTag}>Add </button>
|
||||
<button onClick={saveSelectedOptions}>Save </button> */}
|
||||
<div>
|
||||
<h3>Selected Option:</h3>
|
||||
<ul>
|
||||
@ -110,9 +96,7 @@ const Modal = ({handleClose, text}) => {
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
{/* <p>nickname = "{new_name}"</p> */}
|
||||
{multi === true ? (
|
||||
// <AddSelectTag number={number} array={array} new_name={new_name}/>
|
||||
<GrAdd onClick={addNewSelectedTag}/>) : " "}
|
||||
</div>
|
||||
<div className="div_submit">
|
||||
|
||||
@ -46,6 +46,8 @@ select{
|
||||
.contact{
|
||||
background-color: rgb(46, 46, 46);
|
||||
align-items: left;
|
||||
height: 29.7rem;
|
||||
overflow: scroll;
|
||||
/* width: 2rem; */
|
||||
/* height: 4rem; */
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user