Skip to content

Commit

Permalink
Fix: littles features
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Catinaud Taris committed May 24, 2024
1 parent ed2e21c commit 156be3b
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 8 deletions.
7 changes: 3 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# !STARTERCONF Duplicate this to .env.local
# !STARTERCONF Duplicate this to .env

# DEVELOPMENT TOOLS
# Ideally, don't add them to production deployment envs
# !STARTERCONF Change to true if you want to log data
NEXT_PUBLIC_SHOW_LOGGER="true"

NEXT_PUBLIC_PINKBOMBS_DATA_URL="https://pinkbombsfkynigjl-pinkbombs-data.functions.fnc.fr-par.scw.cloud/api/v1/secure/graphs"
#NEXT_PUBLIC_PINKBOMBS_DATA_URL="https://pinkbombsfkynigjl-pinkbombs-data.functions.fnc.fr-par.scw.cloud:8080/"
NEXT_PUBLIC_PINKBOMBS_DATA_API_KEY="pinkbombs"
export PINKBOMBS_DATA_URL=https://pinkbombsfkynigjl-pinkbombs-data.functions.fnc.fr-par.scw.cloud/api/v1/secure
export PINKBOMBS_DATA_API_KEY=pinkbombs
2 changes: 1 addition & 1 deletion src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ const BusinessSection = () => {
connaît depuis quelques décennies une hyper-croissance à l’échelle
globale.
</p>
<div className="flex md:justify-center min-h-[450px] overflow-y-auto bg-white">
<div className="flex md:justify-center min-h-[450px] overflow-y-auto">
<Plot data={plot.data} layout={plot.layout} />
</div>
<div className="flex justify-center">
Expand Down
15 changes: 14 additions & 1 deletion src/components/DashboardChart.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// import Plot from "react-plotly.js";
import clsx from "clsx";
import dynamic from "next/dynamic";
import { Data } from "plotly.js-dist-min";
import React from "react";
Expand All @@ -9,17 +10,29 @@ const DashboardChart = ({
layout,
id,
className,
height = 450,
width = 700,
}: {
data: Data[];
layout: object;
id: string;
className?: string;
height?: number;
width?: number;
}) => {
if (!id || !data || !layout) {
return <></>;
}

return <Plot divId={id} data={data} layout={layout} className={className} />;
return (
<Plot
divId={id}
data={data}
layout={{ ...layout, width, height }}
config={{ responsive: true }}
className={clsx("!block", className)}
/>
);
};

export default DashboardChart;
2 changes: 1 addition & 1 deletion src/components/Edito.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const Edito = ({
<h2 className={clsx("h1", "text-red1")}>{title}</h2>
<p className="mt-3 lg:mt-6 lg:text-xl text-white">{content}</p>
<Link
className="inline-flex gap-4 mt-6 lg:mt-12 p-4 lg:px-10 lg:text-xl text-red1 font-secondary uppercase rounded-md tracking-widest font-black border-2 border-red1 hover:bg-red1 hover:text-darkblue1"
className="inline-flex gap-4 mt-6 lg:mt-12 p-4 lg:px-10 lg:text-xl text-red1 font-secondary uppercase rounded-md tracking-widest border-2 border-red1 hover:bg-red1 hover:text-darkblue1"
href={link}
>
<svg
Expand Down
2 changes: 1 addition & 1 deletion src/components/JoinBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const IntroBlock = ({
saumon au monde, porte une responsabilité particulière dans
l'orientation des pratiques.
</p>
<div className="flex lg:justify-center min-h-[300px] overflow-y-auto bg-white">
<div className="flex lg:justify-center min-h-[300px] overflow-y-auto">
<Plot data={plot.data} layout={plot.layout} />
</div>
</div>
Expand Down

0 comments on commit 156be3b

Please sign in to comment.