Skip to content

Commit

Permalink
add book tab back all the time
Browse files Browse the repository at this point in the history
  • Loading branch information
aligon committed Nov 16, 2021
1 parent 2399823 commit 39a7202
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Suspense } from 'react';

import { Text, useAsyncValue, useService } from '@nti/web-core';
import { Text } from '@nti/web-core';
import { scoped } from '@nti/lib-locale';
import { LinkTo } from '@nti/web-routing';

Expand Down Expand Up @@ -28,13 +28,6 @@ export default function ContentListNavBar() {
);
}
function Content() {
const service = useService();
const books = useAsyncValue('admin-library-books-list', () =>
service.getContentBundles({ batchSize: 1 })
);

const hasBooks = books?.total > 0;

return (
<Card
className="site-admin-content-list-nav-bar"
Expand All @@ -46,8 +39,7 @@ function Content() {
>
<Tabs header={t('content')}>
<Tab to="./" exact localeKey="courses" />

{hasBooks && <Tab to="./books" localeKey="books" />}
<Tab to="./books" localeKey="books" />
</Tabs>
</Card>
);
Expand Down

0 comments on commit 39a7202

Please sign in to comment.