added book details, update, delete. fixes
This commit is contained in:
parent
d1da980501
commit
b5738c610d
12 changed files with 290 additions and 16 deletions
|
|
@ -3,10 +3,12 @@ import { Link } from '@tanstack/react-router';
|
|||
|
||||
export function BookOverviewTabs({
|
||||
bookId,
|
||||
currentTab
|
||||
currentTab,
|
||||
isAuthor
|
||||
}: {
|
||||
readonly bookId: string;
|
||||
readonly currentTab: 'contents' | 'reviews';
|
||||
readonly currentTab: 'contents' | 'reviews' | 'details';
|
||||
readonly isAuthor: boolean;
|
||||
}) {
|
||||
return (
|
||||
<Tabs.Root defaultValue="members" value={currentTab}>
|
||||
|
|
@ -17,6 +19,11 @@ export function BookOverviewTabs({
|
|||
<Link to={`/work/book/${bookId}/overview/reviews`}>
|
||||
<Tabs.Trigger value="reviews">Reviews</Tabs.Trigger>
|
||||
</Link>
|
||||
{isAuthor && (
|
||||
<Link to={`/work/book/${bookId}/overview/details`}>
|
||||
<Tabs.Trigger value="details">Details</Tabs.Trigger>
|
||||
</Link>
|
||||
)}
|
||||
</Tabs.List>
|
||||
</Tabs.Root>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue