Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions client/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { BrowserRouter, Routes, Route } from "react-router";
import AppShell from "./components/AppShell/AppShell";
import { BrowsePage } from "./pages/BrowsePage";

/* ---------- Temporary placeholder pages (delete when the real ones exist) ---------- */
function BrowsePlaceholder() {
return <h1>Browse page</h1>;
}
function ShelfPlaceholder() {
return <h1>My shelf page</h1>;
}
Expand All @@ -18,7 +16,7 @@ export default function App() {
<BrowserRouter>
<Routes>
<Route element={<AppShell />}>
<Route index element={<BrowsePlaceholder />} />
<Route index element={<BrowsePage />} />
<Route path="shelf" element={<ShelfPlaceholder />} />
<Route path="book/:id" element={<DetailPlaceholder />} />
</Route>
Expand Down
11 changes: 11 additions & 0 deletions client/src/data/mockBooks.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import type {Book} from '../types/book';
import booksJson from '../../../server/test-data/books.json';

export type ShelfEntry = {bookId: Book['id']; rating?: number};

export const mockBooks: Book[] = booksJson.map(({googleBooksId, ...rest}) => ({
id: googleBooksId,
...rest,
}));

export const mockShelfEntries: ShelfEntry[] = [];