- {qas.map((question) => (
-
- ))}
- {!fetching ? (
-
-
- throttleChapterRequest({
- body: {
- chapterRequestId: request.id,
- approved: true,
- },
- })
- }
- >
- Accept
-
-
- throttleChapterRequest({
- body: {
- chapterRequestId: request.id,
- approved: false,
- },
- })
- }
- >
- Decline
-
+ readonly ? (
+
+ {qas.map((question) => (
+
+ ))}
+
+ ) : (
+
+
+ {qas.map((question) => (
+
+ ))}
+ {!fetching ? (
+
+
+ throttleChapterRequest({
+ body: {
+ chapterRequestId: request.id,
+ approved: true,
+ },
+ })
+ }
+ >
+ Accept
+
+
+ throttleChapterRequest({
+ body: {
+ chapterRequestId: request.id,
+ approved: false,
+ },
+ })
+ }
+ >
+ Decline
+
+
+ ) : (
+
+
+
+ )}
- ) : (
-
-
-
- )}
-
+
+ )
}
/>
);
diff --git a/src/components/TileGrid/InfoTile.tsx b/src/components/TileGrid/InfoTile.tsx
index e7d762be..79cd98cf 100644
--- a/src/components/TileGrid/InfoTile.tsx
+++ b/src/components/TileGrid/InfoTile.tsx
@@ -2,7 +2,6 @@
import Link from "next/link";
import React from "react";
-import DropDownContainer from "@components/container/DropDownContainer";
interface Information {
key: string;
@@ -15,24 +14,19 @@ interface InfoTileProps {
topRightButton?: React.ReactNode;
moreInformation?: React.ReactNode;
href?: string;
+ ContainerNode?: ({ children }: { children?: React.ReactNode }) => JSX.Element;
+ defaultExpand?: boolean;
}
-/**
- * Displays a tile with the given information.
- *
- * @param information An array of key-value pairs. Each row of the tile display 2 information, as specified by the order
- * in the array
- * @param moreInformation If present, will display a "show more" option that expands on click
- */
-const InfoTile = (params: InfoTileProps) => {
- const { title, information, topRightButton, moreInformation, href } = params;
+const _InfoTile = (props: Omit
) => {
+ const { title, information, topRightButton, moreInformation, href } = props;
return (
{title}
@@ -49,17 +43,31 @@ const InfoTile = (params: InfoTileProps) => {
))}
- {moreInformation ? (
-
- Show more
-
- }
- >
- {moreInformation}
-
- ) : null}
+ {moreInformation ?? null}
+
+ );
+};
+
+/**
+ * Displays a tile with the given information.
+ *
+ * @param information An array of key-value pairs. Each row of the tile display 2 information, as specified by the order
+ * in the array
+ * @param moreInformation If present, will display a "show more" option that expands on click
+ */
+const InfoTile = (props: InfoTileProps) => {
+ const { ContainerNode, ...other } = props;
+
+ if (ContainerNode != undefined) {
+ return (
+