Renders a dump's page, with its preview, comments, related dumps and the playlists holding it.
Renders /@:username/dumps/:slug, for anyone who may see the dump: a
private dump answers 404 to anyone but its poster. The dump comes from
GET /api/users/@:username/dumps/:slug, or from the navigation's state when
DumpEdit or a title edit here just saved it. Reached by a former name or
slug, the URL takes the current ones. Its comments, related dumps and
playlists come from their own endpoints once it is loaded, and the socket's
events keep them current; a reconnection fetches them and the dump again.
A dump deleted, or made private by its poster, while someone else views it
gives way to a notice. The poster and moderators can edit the title and the
note in place, and get a link to DumpEdit for the rest.
Returned by every endpoint that answers dumps, and pushed to clients by the
dump_created and dump_updated socket messages. A URL dump has url and
richContent, a file dump the file⦠fields. A private dump reaches its
poster only.
- categoryIds: string[]
-
comment: string
The poster's note on the dump, in Markdown.
-
commentCount: number
Deleted comments are not counted.
- createdAt: Date
- fileMime: string
- fileName: string
- fileSize: number
- id: string
- isPrivate: boolean
- kind: "url" | "file"
-
ownerUsername: string
The poster's current name, which the dump's path starts with.
- richContent: RichContent
-
slug: string
Names the dump in its page's path,
dumpPath(shared/paths.ts) building it with ownerUsername. Made from the title on creation, it changes only when edited, and is unique among its poster's dumps. -
thumbnailMime: string
Set when the poster uploaded a custom thumbnail.
- title: string
- updatedAt: Date
- url: string
- userId: string
- voteCount: number
Usage
import * as mod from "src/pages/Dump.tsx";