Skip to content

refactor(hooks): extract shared attendance data fetching logic into custom hook #15

Description

@Vishal-770

Description

Currently, src/pages-mobile/dashboard/attendance/[classId].tsx and src/pages-desktop/dashboard/attendance/[classId].tsx duplicate data fetching, local storage hydration, offline handling, and manual retry states.

Tasks

  • Create src/hooks/use-attendance-detail.ts hook.
  • Move cache loading, network fetch, and manual retry state into the hook.
  • Refactor both Mobile and Desktop attendance detail pages to consume the hook.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions