Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
shahdivyank committed Nov 13, 2023
1 parent 3c90448 commit c2588d0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/components/dynamic/user/Team.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import { BiLink, BiSolidCopy } from "react-icons/bi";

const Team = ({ user, setUser }) => {
const [team, setTeam] = useState(null);
const [id, setId] = useState({});
const [id, setId] = useState({
team: "",
});
const [edit, setEdit] = useState(false);
const defaultTeam = {
name: "",
Expand All @@ -32,12 +34,13 @@ const Team = ({ user, setUser }) => {
toast("✅ Successfully left team!");
setTeam(null);
setUser({ ...user, team: null });
setId({});
setId({ team: "" });
});
};

const handleJoin = () => {
if (id.team == null) {
console.log(id);
if (id.team === "") {
toast("❌ Enter a Valid Team ID");
return;
}
Expand Down

0 comments on commit c2588d0

Please sign in to comment.