-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Labels
bugSomething isn't workingSomething isn't workingdifficulty: easyonlydust-waveContribute to awesome OSS repos during OnlyDust's open source weekContribute to awesome OSS repos during OnlyDust's open source week
Description
🐛 Bug: "Watch" Page Route (/:username/watch) Returns 404 Instead of Rendering Placeholder View
Summary
Currently, navigating to the Watch page (e.g., http://localhost:3000/chidinma/watch) results in a 404 error. This is because the route app/[username]/watch/page.tsx does not exist. We need to implement this dynamic route similar to how ClipsPage works, with placeholder logic and empty state rendering.
Expected Behavior
-
The route
/username/watchshould:- Load a page with the message
{username} does not have any watched videosif the list is empty. - Show a loading message while data is being fetched.
- Fallback to
notFound()if the user does not exist.
- Load a page with the message
Actual Behavior
- Navigating to
http://localhost:3000/username/watchleads to a 404 page.
Suggested Implementation
Create a new file:
pages/[username]/watch.tsx
Use a structure similar to ClipsPage, with:
- A mock function like
fetchWatchedVideos(username) useEffectto simulate fetchinguseStatefor loading and storing videos- Use
<EmptyState type="watch" isOwner={isOwner} username={username} />to render empty states
Example placeholder condition:
<p className={textClasses.tertiary}>{username} does not have any watched videos</p>Acceptance Criteria
- Page at
/:username/watchrenders correctly. - Uses dynamic route param
username. - Shows loading state while fetching.
- Shows empty state message if no watched videos.
- Returns 404 via
notFound()if user doesn’t exist. - Fully integrated with
EmptyStatecomponent (type ="watch").
Labels: bug, frontend, routing, good first issue
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdifficulty: easyonlydust-waveContribute to awesome OSS repos during OnlyDust's open source weekContribute to awesome OSS repos during OnlyDust's open source week