Skip to content

Conversation

@zintarh
Copy link
Contributor

@zintarh zintarh commented Aug 10, 2025

Project Owner, Validator, and Researcher Reports Integration with useGetReport Hook

https://www.loom.com/share/a65c59f641d4485184fc43c7ebdbc71a?sid=38bb5a39-2569-428a-8ef8-eead16a526d8

closes #109

Overview

This PR integrates the useGetReport, enabling real-time blockchain and IPFS data fetching for single reports. It replaces the old static mock data approach with a dynamic, blockchain-powered reporting interface, delivering authenticated and verifiable report data directly from smart contracts and IPFS.


Key Changes

  1. Dynamic Route

    • src/app/dashboard/project-owner/reports/[reportId]/page.tsx
    • Provides dynamic report pages by reportId
  2. useGetReport Hook Integration

    • Replaces mock data with real-time blockchain + IPFS fetching
    • Merges both into a unified UnifiedReport structure
  3. Improved Error + Loading Handling

    • Skeleton loaders during fetch
    • User-friendly "No Report Found" message
    • Retry functionality for failed requests

Technical Implementation

Data Flow

  • Extract reportId → call useGetReport → fetch blockchain + IPFS → unify data → render states

State Management

  • Loading: Skeleton UI
  • Error: Clear fallback with retry
  • Success: Full detailed report
  • Empty: Graceful fallback

Performance Optimizations

  • Single hook for blockchain + IPFS fetching
  • Memoization to prevent unnecessary re-renders
  • Conditional rendering for available data only

@vercel
Copy link

vercel bot commented Aug 10, 2025

@zintarh is attempting to deploy a commit to the Onuora Ebube Ebuka's projects Team on Vercel.

A member of the Team first needs to authorize it.

@zintarh zintarh changed the title feat: implement get_report functionality for admin, validator, researcher dashboard feat: integrate get_report functionality for admin, validator, researcher dashboard Aug 11, 2025
@ONEONUORA
Copy link
Contributor

@zintarh Pls update on this issue

@ONEONUORA ONEONUORA closed this Aug 24, 2025
@ONEONUORA ONEONUORA reopened this Aug 25, 2025
@zintarh zintarh marked this pull request as ready for review August 26, 2025 16:12
Copy link
Contributor

@ONEONUORA ONEONUORA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice implementation, Thank you for your contribution

@ONEONUORA ONEONUORA merged commit b0fdba7 into skill-mind:main Aug 26, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[INTEGRATION] #IMPLEMENT THE GET REPORT FUNCTION

2 participants