Project

General

Profile

Actions

dev #2828

open

dev #2794: [Module] Sprint 11

[FE] Team members dropdown shows with a delay in tool detail page

Added by Najmul Hasan 8 months ago. Updated 8 months ago.

Status:
Complete
Priority:
High
Assignee:
Target version:
Start date:
08/11/2025
Due date:
% Done:

100%

Estimated time:
2:00 h
Spent time:
Actions #1

Updated by Najmul Hasan 8 months ago

  • % Done changed from 0 to 90
  • Changes Made
    • In ToolAuthorAndVideoClient.tsx (for rendering delay):

Memoized the fetchData function using useMemo to prevent unnecessary re-creations and API calls.
Added error handling with a fallback to empty data (setData([])) to ensure rendering continues on failures.
Simplified useEffect to depend only on the memoized fetchData.

  • In AuthorVerified.tsx (for both issues):

    • Rendering Delay:

Removed conditional rendering around the dropdown content; now always renders the list but controls visibility with CSS (max-h-96 opacity-100 visible vs. max-h-0 opacity-0 invisible overflow-hidden).
Improved keys in map loops for stability (using userId or userName fallback).
Retained Image and Link for consistency with Next.js optimizations.

Close on Outside Click:

Added useRef to reference the dropdown container.
Added useEffect to listen for mousedown events on the document, closing the dropdown if the click is outside the ref.

Actions #2

Updated by Najmul Hasan 8 months ago

  • Status changed from In Progress to Complete
  • % Done changed from 90 to 100
Actions

Also available in: Atom PDF