diff --git a/components/sections/friends/add/index.tsx b/components/sections/friends/add/index.tsx index 238da90..440d36b 100644 --- a/components/sections/friends/add/index.tsx +++ b/components/sections/friends/add/index.tsx @@ -32,17 +32,12 @@ const AddFriend = (props: IAddFriendProps) => { } if (props) { - const { onAddFriendHandler, onSelectGroupHandler, groups, - // setGroup, setMessages, setSection - } = props; + const { onAddFriendHandler, onSelectGroupHandler, groups } = props; const handleInvitation = async () => { const tempGroup = groups?.find(g => g.targetId === user?.id); if (tempGroup) { onSelectGroupHandler(tempGroup.id); - // setGroup(tempGroup); - // setMessages(tempGroup?.messages); - // setSection(sections.group); return; } setLoading(true); @@ -56,8 +51,7 @@ const AddFriend = (props: IAddFriendProps) => { const handleSearch = (event: { preventDefault: () => void }) => { event.preventDefault(); - const value = searchRef?.current?.value ?? ""; - const length = value.length; + const value = searchRef?.current?.value ?? "", length = value.length; setUserFound(userSearchMessageTypes.notFound); if (users && value) { const user = users.find( diff --git a/components/sections/index.tsx b/components/sections/index.tsx index f29fa06..96c39dc 100644 --- a/components/sections/index.tsx +++ b/components/sections/index.tsx @@ -21,7 +21,6 @@ const SectionSwitch = (props: ISecitonSwitchProps) => { messages, group, setGroup, - setMessages, active, notifs, lastMessageRef, @@ -61,9 +60,7 @@ const SectionSwitch = (props: ISecitonSwitchProps) => { } else if (section === sections.addFriend) { return (