diff --git a/src/app/exhibitsPage/page.tsx b/src/app/exhibitsPage/page.tsx
index d69f2aa6..eab159f7 100644
--- a/src/app/exhibitsPage/page.tsx
+++ b/src/app/exhibitsPage/page.tsx
@@ -25,7 +25,7 @@ function App() {
}, [exhibits]);
// for web rendering
- const [windowWidth, setWindowWidth] = useState(1024);
+ const [windowWidth, setWindowWidth] = useState(window.innerWidth);
useEffect(() => {
const handleResize = () => setWindowWidth(window.innerWidth);
window.addEventListener('resize', handleResize);
@@ -54,7 +54,7 @@ function App() {
}, []);
return (
- {windowWidth < 1024 && (
+ {windowWidth <= 1024 && (
@@ -88,13 +88,14 @@ function App() {
image={exhibit.image || ''}
key={exhibit.id}
id={exhibit.id}
+ web={false}
/>
))}
)}
- {windowWidth >= 1024 && (
+ {windowWidth > 1024 && (
@@ -121,13 +122,13 @@ function App() {
-
)}
diff --git a/src/components/userComponents/Exhibit/Exhibit.tsx b/src/components/userComponents/Exhibit/Exhibit.tsx
index a0633e16..0961048f 100644
--- a/src/components/userComponents/Exhibit/Exhibit.tsx
+++ b/src/components/userComponents/Exhibit/Exhibit.tsx
@@ -8,6 +8,7 @@ import Image from 'next/image';
* @param root0.description description of exhibit
* @param root0.image image
* @param root0.id id of exhibit
+ * @param root0.web
* @returns exhibit component
*/
export default function Exhibit({
@@ -15,28 +16,51 @@ export default function Exhibit({
description,
image,
id,
+ web,
}: {
title: string;
description: string;
image: string;
id: number;
+ web: boolean;
}) {
return (
-
-
-
-
-
- {' '}
- {title}
-
+
+ {!web && (
+
+
+
+
+
+ {' '}
+ {title}
+
+
+
+ {description}
+
+
+
+
+
+ )}
+ {web && (
+
+
+
+
+ {' '}
+ {title}
+
+
+
+ {description}
+
-
- {description}
-
+
-
-
+ )}
+
);
}