◐ Shell
clean mode source ↗

fix: last activity timestamp shows incorrectly for all projects by uddhav05-cyber · Pull Request #482 · github/forgoodfirstissue

Pull request overview

This PR fixes incorrect/stale “Last Activity” relative timestamps by moving dayjs.extend(relativeTime) out of the RepositoryItem component and extracting the logic into a reusable useLastModified hook.

Changes:

  • Added hooks/useLastModified.tsx custom hook and initialized dayjs relative-time plugin at module scope.
  • Updated components/RepositoryItem.tsx to consume useLastModified and removed inline dayjs/hook logic.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
hooks/useLastModified.tsx New hook for computing “last modified” relative time; initializes dayjs plugin once.
components/RepositoryItem.tsx Uses the new hook instead of defining it inline; removes repeated dayjs.extend.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.