This repository has been archived by the owner on Jan 16, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(page:home): fetch live submissions and display it
## what - fetch live submissions and display it - fetch data - display `loading` when fetching data - display `error` when fetching has failed - display live submissions after fetching data - refetch data after `5000ms` ## how - store the initial pollId to 0 using React `useRef` - fetch the data using hook `useFetchLiveSubmission` - requires pollId - refetch data after `5000ms` - store the pollId to the latest submission ID after a successfully fetching data - display `Loading data` when initially fetching data - display `Error fetching data` when there's an error fetching data - display the fetched data using `LiveSubmissionTable` component ## why - to display live submissions data ## where - ./src/app/page.tsx ## usage
- Loading branch information