You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.4 KiB
Markdown
51 lines
1.4 KiB
Markdown
---
|
|
# quotesdb-jlef
|
|
title: Implement Author page (/author/:name) — paginated list of quotes by a single author
|
|
status: completed
|
|
type: task
|
|
priority: normal
|
|
created_at: 2026-03-10T23:32:10Z
|
|
updated_at: 2026-03-10T23:32:17Z
|
|
blocked_by:
|
|
- quotesdb-xqh3
|
|
- quotesdb-dgwi
|
|
- quotesdb-oukj
|
|
- quotesdb-6huz
|
|
- quotesdb-kg2l
|
|
- quotesdb-k258
|
|
- quotesdb-wlpv
|
|
---
|
|
|
|
<context>
|
|
The `quotesdb` UI is a Yew (Rust → Wasm) single-page app compiled by Trunk and hosted on Cloudflare Pages. It communicates with the backend API via `fetch` calls. Source lives in `src/bin/ui/`. Run with `trunk serve` for local development.
|
|
|
|
The Author page (`/author/:name`) shows all quotes by a specific author, paginated.
|
|
</context>
|
|
|
|
<goal>
|
|
Implement the Author page component (`src/bin/ui/pages/author.rs`):
|
|
1. Extract `:name` from the route
|
|
2. Fetch quotes from `GET /api/quotes?author=:name&page=N`
|
|
3. Render the author name as a heading
|
|
4. Render each quote with `QuoteCard`
|
|
5. Render `Pagination` for prev/next navigation
|
|
6. Render `ErrorDisplay` on error
|
|
</goal>
|
|
|
|
<constraints>
|
|
- Author name in the URL may be URL-encoded — decode it before using in the API call and heading.
|
|
- Page is tracked in the URL query string (`?page=N`).
|
|
</constraints>
|
|
|
|
<validation>
|
|
From the `quotesdb/` directory:
|
|
|
|
```sh
|
|
trunk build
|
|
```
|
|
</validation>
|
|
|
|
<commit>
|
|
`feat(quotesdb): implement Author page — paginated quotes by author`
|
|
</commit>
|