Skip to content

Commit

Permalink
satisfying linter
Browse files Browse the repository at this point in the history
Why do I have to satisfy this Linter each time? He never did something to make me happy. I don't like a one sided relation...
  • Loading branch information
farooqkz committed Sep 25, 2023
1 parent ed0c7b0 commit df15a25
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions src/renderer/components/dialogs/CreateChat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,7 @@ export default function CreateChat(props: {
</>
)}
{viewMode.startsWith('createGroup') && (
<CreateGroupInner
{...{ viewMode, setViewMode, onClose }}
/>
<CreateGroupInner {...{ viewMode, setViewMode, onClose }} />
)}
{viewMode.startsWith('createVerifiedGroup') && (
<CreateGroupInner isVerified {...{ viewMode, setViewMode, onClose }} />
Expand Down Expand Up @@ -650,7 +648,13 @@ function CreateGroupInner(props: {
groupId,
lazilyCreateOrUpdateGroup,
finishCreateGroup,
] = useCreateGroup(Boolean(isVerified), groupName, groupImage, groupMembers, onClose)
] = useCreateGroup(
Boolean(isVerified),
groupName,
groupImage,
groupMembers,
onClose
)

const viewPrefix = isVerified ? 'createVerifiedGroup' : 'createGroup'

Expand All @@ -666,15 +670,13 @@ function CreateGroupInner(props: {
*/
const [groupContacts, setGroupContacts] = useState<Type.Contact[]>([])

useMemo(
() => {
BackendRemote.rpc.getContactsByIds(accountId, groupMembers).then((records) => {
useMemo(() => {
BackendRemote.rpc
.getContactsByIds(accountId, groupMembers)
.then(records => {
setGroupContacts(Object.entries(records).map(([_, contact]) => contact))
})
},
[accountId, groupMembers]
)

}, [accountId, groupMembers])

const showAddMemberDialog = () => {
const listFlags = isVerified
Expand All @@ -691,7 +693,6 @@ function CreateGroupInner(props: {
})
}

console.log(groupContacts)
return (
<>
{viewMode.startsWith(viewPrefix + '-showQrCode') && (
Expand Down

0 comments on commit df15a25

Please sign in to comment.