front end feature to showing pending connection request in sidebar.

This commit is contained in:
2026-06-21 13:26:55 +03:30
parent 4e2a9765bc
commit 2f99abbb9e
4 changed files with 68 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ import { useEffect, useState } from 'react';
import { useToast } from '@/lib/hooks/useToast';
import { Check, Trash2, UserPlus, X } from 'lucide-react';
import { useAuth } from '@/lib/hooks/useAuth';
import { notifyPendingConnectionsChanged } from '@/lib/hooks/usePendingConnectionsCount';
import { useOrganizationInviteLinkCopy } from '@/lib/hooks/useOrganizationInviteLinkCopy';
import {
organizationApi,
@@ -246,6 +247,7 @@ export default function OrganizationsPage() {
toast.showSuccess(
action === 'ACCEPT' ? 'Connection request accepted.' : 'Connection request declined.',
);
notifyPendingConnectionsChanged();
await loadList();
} catch (e) {
toast.showError(formatApiMessage(e));