-
{title}
+
{title}
+
{mainContent}
{content}
{cta &&
{cta}
}
diff --git a/src/components/Edito.tsx b/src/components/Edito.tsx
index d120e590d..bd97bbe24 100644
--- a/src/components/Edito.tsx
+++ b/src/components/Edito.tsx
@@ -66,10 +66,17 @@ const IconCard = ({
-
+
{image.small && (
)}
@@ -82,9 +89,12 @@ const IconCard = ({
width={600}
height={600}
alt=""
+ className="w-full"
/>
- {image.caption && {image.caption} }
+ {image.caption && (
+ {image.caption}
+ )}
) : null}
diff --git a/src/components/IconCard.tsx b/src/components/IconCard.tsx
index 5458f4a35..6bd5162a5 100644
--- a/src/components/IconCard.tsx
+++ b/src/components/IconCard.tsx
@@ -29,8 +29,10 @@ const IconCard = ({
className="max-[767px]:w-12 max-[767px]:h-12 max-[1023px]:w-24 max-[1023px]:h-24 object-contain"
/>
) : null}
-
{title}
-
{content}
+
{title}
+
+ {content}
+
);
};
diff --git a/src/components/IntroBlock.tsx b/src/components/IntroBlock.tsx
index 7b2929185..d8c04cf0c 100644
--- a/src/components/IntroBlock.tsx
+++ b/src/components/IntroBlock.tsx
@@ -23,7 +23,7 @@ const IntroBlock = ({
image ? "h-screen min-h-[300px]" : "min-h-[660px]",
)}
>
-
+
{image && (
import("react-plotly.js"), { ssr: false, })
+
+import { useState, useEffect } from "react";
+import { fetchData } from "@/pages/api/chart";
import PrimaryButton from "@/components/buttons/PrimaryButton";
@@ -11,6 +17,22 @@ const IntroBlock = ({
className?: string;
headDark?: boolean;
}) => {
+
+ const [plot, setPlot] = useState({
+ data: [],
+ layout: {},
+ });
+ const fetchGraphData = async () => {
+ const response = await fetchData("graphs", "alternatives");
+ setPlot(response);
+ };
+ useEffect(() => {
+ fetchGraphData();
+ }, []);
+
+ if (!plot) {
+ return <>>;
+ }
return (
@@ -71,8 +88,8 @@ const IntroBlock = ({
diff --git a/src/components/layout/Navbar.tsx b/src/components/layout/Navbar.tsx
index f64c0e99e..985663bd5 100644
--- a/src/components/layout/Navbar.tsx
+++ b/src/components/layout/Navbar.tsx
@@ -19,6 +19,10 @@ const navItems: NavItemsProps = [
link: "/dashboard",
text: "Dashboard",
},
+ {
+ link: "/to-act",
+ text: "To act",
+ },
{
link: "/about",
text: "About",
@@ -30,7 +34,7 @@ const Navbar = () => {
return (
-
+
{
- const dataUrl = process.env.NEXT_PUBLIC_PINKBOMBS_DATA_URL;
- const apiKey = process.env.NEXT_PUBLIC_PINKBOMBS_DATA_API_KEY;
+"use server";
+export const fetchData = async (apiPath: string, chartName: string) => {
+ const dataUrl = process.env.PINKBOMBS_DATA_URL;
+ const apiKey = process.env.PINKBOMBS_DATA_API_KEY;
try {
- const response = await fetch(`${dataUrl}/${chartType}`, {
+ const response = await fetch(`${dataUrl}/${apiPath}/${chartName}`, {
method: "GET",
headers: {
"X-API-Key": apiKey,
diff --git a/tailwind.config.ts b/tailwind.config.ts
index 6f14516a7..145181fcd 100644
--- a/tailwind.config.ts
+++ b/tailwind.config.ts
@@ -36,7 +36,7 @@ export default {
},
screens: {
xs: "500px",
- "2xl": "1515px",
+ "2xl": "1530px",
"3xl": "2000px",
},
keyframes: {