diff --git a/src/containers/about/partners/index.tsx b/src/containers/about/partners/index.tsx
index 84dd5c5..a29eda2 100644
--- a/src/containers/about/partners/index.tsx
+++ b/src/containers/about/partners/index.tsx
@@ -27,7 +27,7 @@ export default function Partners() {
technology, and natural sciences, most of whom also have substantial experience with
hands-on Citizen Science. The consortium also consists of institutional actors,
environmental NGOs practicing Citizen Science, as well as a network of Fab Labs and
- Designers and the private sector. This enables the more4nature consortium to implement its
+ designers and the private sector. This enables the more4nature consortium to implement its
ambitious and truly innovative approach.
diff --git a/src/containers/about/work-packages/index.tsx b/src/containers/about/work-packages/index.tsx
index b3aed90..4dc25eb 100644
--- a/src/containers/about/work-packages/index.tsx
+++ b/src/containers/about/work-packages/index.tsx
@@ -1,9 +1,3 @@
-'use client';
-
-import { useEffect, useRef, useState } from 'react';
-
-import { Media } from '@/containers/media';
-
import DiscoverMoreButton from '@/components/discover-more-button';
import {
Dialog,
@@ -62,138 +56,40 @@ const WORK_PACKAGES = [
},
];
-function getScrollPositionRelativeToElement(element: HTMLLIElement) {
- const rect = element.getBoundingClientRect();
-
- return {
- top: rect.top + window.scrollY,
- left: rect.left + window.scrollX,
- };
-}
-
export default function WorkPackages() {
- const [pagePositionY, setPagePositionY] = useState(0);
- const itemsRefs = useRef([]);
- const [itemsBreakpoints, setItemsBreakpoints] = useState<
- {
- start: number;
- end: number;
- }[]
- >([]);
- const [currentWorkPackage, setCurrentWorkPackage] = useState(1);
-
- useEffect(() => {
- const getPositionY = () => {
- setPagePositionY(window.scrollY);
- };
- window.addEventListener('scroll', getPositionY);
-
- return () => {
- window.removeEventListener('scroll', getPositionY);
- };
- }, []);
-
- useEffect(() => {
- if (itemsRefs.current?.length) {
- const newItemsBreakpoints = itemsRefs.current.map((itemRef) => {
- const { top } = getScrollPositionRelativeToElement(itemRef);
- return {
- start: top,
- end: top + itemRef.clientHeight,
- };
- });
- setItemsBreakpoints(newItemsBreakpoints);
- }
- }, []);
-
- useEffect(() => {
- itemsBreakpoints.forEach((item, index) => {
- if (pagePositionY >= item.start && pagePositionY <= item.end) {
- setCurrentWorkPackage(index + 1);
- }
- });
- }, [itemsBreakpoints, pagePositionY]);
-
return (
Work Packages
-
-
- {WORK_PACKAGES.map(({ name, description, organization }, index) => (
- - (itemsRefs.current[index] = el as NonNullable)}
- >
-
-
-
- 0{index + 1}
- /0{WORK_PACKAGES.length}
-
-
{name}
-
-
-
-
- ))}
-
-
-
-
-
-
- 0{currentWorkPackage}
+
+ {WORK_PACKAGES.map(({ name, description, organization }, index) => (
+ -
+
+ 0{index + 1}
/0{WORK_PACKAGES.length}
-
-
- {WORK_PACKAGES.map(({ name, description, organization }, index) => (
- - (itemsRefs.current[index] = el as NonNullable)}
- >
-
-
{name}
-
-
-
- ))}
-
-
-
+
+
{name}
+
+
+
+ ))}
+
);