error components

This commit is contained in:
Little Dipper 2023-06-13 13:36:01 +02:00
parent 69d48df0fa
commit 8e7500c7cb
2 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,13 @@
// import Alert from '@mui/material/Alert';
// import Stack from '@mui/material/Stack';
function BasicAlert () {
return(
<></>
// <Stack sx={{width: '100%'}} spacing={2}>
// <Alert severity="success">Check this out</Alert>
// </Stack>
)
}
export default BasicAlert

View File

@ -235,10 +235,16 @@ function Chats(){
const findValue = () => { const findValue = () => {
setFind(false); setFind(false);
console.log(friend);
Rank.map((tab) => { Rank.map((tab) => {
if (tab.name === friend) if (tab.name === friend)
{
console.log("ok bon");
setFind(true); setFind(true);
}
}) })
console.log(find);
// if (!find)
}; };
// console.log(`data user1= ${user.username}`) // console.log(`data user1= ${user.username}`)
@ -284,7 +290,7 @@ function Chats(){
<TouchDiv> <TouchDiv>
<div onClick={findValue}> <div onClick={findValue}>
<MdOutlineGroupAdd/> <MdOutlineGroupAdd/>
{find ? (<BasicAlert/>) : ("")} {find ? ("<BasicAlert/>") : ("")}
</div> </div>
</TouchDiv> </TouchDiv>
<TouchDiv> <TouchDiv>