diff --git a/frontend/src/components/ActivityBookList.tsx b/frontend/src/components/ActivityBookList.tsx
index 4b6dcba..380abcb 100644
--- a/frontend/src/components/ActivityBookList.tsx
+++ b/frontend/src/components/ActivityBookList.tsx
@@ -56,16 +56,18 @@ function BookPreviewList({
linkSuffix,
loading,
showPublished,
+ useOwnGrid,
}: {
pageBookData: Book[];
linkPrefix: string;
linkSuffix: string;
loading: boolean;
showPublished: boolean;
+ useOwnGrid: boolean;
}) {
const emptyBookData = Array.from({ length: 6 }, () => ({}));
- return (
-
+ const content = (
+ <>
{!loading
? pageBookData.map((BookData: Book, i: number) => (
-
@@ -88,8 +90,18 @@ function BookPreviewList({
))}
-
+ >
);
+
+ if (useOwnGrid) {
+ return (
+
+ );
+ } else {
+ return content;
+ }
}
export default function ActivityBookList({
@@ -98,33 +110,44 @@ export default function ActivityBookList({
linkSuffix,
loading,
showPublished,
- isUnplugged,
+ useOwnGrid = true,
}: {
books: Book[];
linkPrefix: string;
linkSuffix: string;
loading?: boolean;
showPublished?: boolean;
- isUnplugged?: boolean;
+ useOwnGrid?: boolean;
}) {
- return (
+ const content = (
<>
-
+
>
);
+
+ if (useOwnGrid) {
+ return ;
+ } else {
+ return content;
+ }
}
-export function BookPreviewUnplugged({ BookData }: { BookData: Array }) {
- return (
-
+export function BookPreviewUnplugged({
+ BookData,
+ useOwnGrid = true,
+}: {
+ BookData: Array
;
+ useOwnGrid?: boolean;
+}) {
+ const content = (
+ <>
{BookData.map((book, index) => (
))}
-
+ >
);
+
+ if (useOwnGrid) {
+ return {content}
;
+ } else {
+ return content;
+ }
}
diff --git a/frontend/src/pages/TeacherResources.tsx b/frontend/src/pages/TeacherResources.tsx
index 4f9ebc7..4ba5ddb 100644
--- a/frontend/src/pages/TeacherResources.tsx
+++ b/frontend/src/pages/TeacherResources.tsx
@@ -4,7 +4,10 @@ import Background from "../components/Background";
import PostPreview from "../components/PostPreview";
import { useCallback, useEffect, useState } from "react";
import { Book, BooksService } from "../api";
-import ActivityBookList from "../components/ActivityBookList";
+import ActivityBookList, {
+ BookPreviewUnplugged,
+} from "../components/ActivityBookList";
+import { unpluggedBooks } from "../util/UnpluggedBooks";
export default function ActivityPostList() {
const [results, setResults] = useState([]);
@@ -70,13 +73,20 @@ export default function ActivityPostList() {
- Books for Teachers
-
+ Books for Teachers
+