Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 64 additions & 1 deletion components/sankey/Render.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import SankeyFilter from "./SankeyFilter";
import SankeyGraph from "./SankeyGraph";
import { SingleValue } from "react-select";
import { useWindowSize } from "usehooks-ts";
import { getDateString } from "@/utils/helpers";

export default function SankeyRender() {
const { height: windowHeight } = useWindowSize();
Expand Down Expand Up @@ -59,7 +60,6 @@ export default function SankeyRender() {

return (
<>

<div className="border border-dune-300">
<SankeyFilter
entityData={entitiesData?.entities}
Expand All @@ -82,6 +82,69 @@ export default function SankeyRender() {
error={sankeyError}
/>
</div>
<div className="border border-dune-300 bg-dune-200 px-6 py-6 rounded-md text-center space-y-6">
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The added banner is missing a top margin or spacing, which could cause it to be immediately adjacent to the element above. Consider adding a top margin (e.g., 'mt-4' or 'mt-6') to maintain consistent spacing with the surrounding layout.

Suggested change
<div className="border border-dune-300 bg-dune-200 px-6 py-6 rounded-md text-center space-y-6">
<div className="border border-dune-300 bg-dune-200 px-6 py-6 rounded-md text-center space-y-6 mt-6">

Copilot uses AI. Check for mistakes.

{/* Headline */}
<p className="font-semibold text-lg">
Orderflow.art was a proof of concept.
</p>

{/* Centered date paragraph */}
{rangeData?.data?.range && (
<div className="text-left max-w-xl mx-auto text-sm">
The data displayed on this site covers the period from{" "}
<strong>{getDateString(rangeData.data.range.startTime).split(" ")[0]} ({rangeData.data.range.startBlock})</strong>{" "}
to{" "}
<strong>{getDateString(rangeData.data.range.endTime).split(" ")[0]} ({rangeData.data.range.endBlock})</strong>{" "}
and is no longer being updated.
</div>
)}

{/* LEFT-ALIGNED block */}
<div className="text-left max-w-xl mx-auto">
<p className="text-sm mb-4">
If you are interested in current data, here are the available options:
</p>

<ul className="text-sm space-y-4 list-none pl-0">
<li>
<span className="font-semibold">Allium</span>
<div>
<a
href="https://dexanalytics.org/metrics/orderflow"
target="_blank"
rel="noopener noreferrer"
className="text-dune-600 underline hover:text-dune-800"
>
dexanalytics.org/metrics/orderflow
</a>
</div>
<div className="text-xs text-gray-700">
Available chains: Ethereum, Arbitrum, Base, Unichain
</div>
</li>

<li>
<span className="font-semibold">Barter</span>
<div>
<a
href="https://orderflow.barterswap.xyz"
target="_blank"
rel="noopener noreferrer"
className="text-dune-600 underline hover:text-dune-800"
>
orderflow.barterswap.xyz
</a>
</div>
<div className="text-xs text-gray-700">
Available chains: Ethereum
</div>
</li>
</ul>
</div>
</div>


</>
);
}
9 changes: 0 additions & 9 deletions components/sankey/SankeyGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ const SankeyGraph: FC<Props> = ({ height, txHash, isLoading, data, rangeData, er
<Loader title="Loading Sankey Diagram..." />
</div>
)}
<div className="flex w-full flex-row justify-end bg-dune-50 p-1 font-mono">
<DataRange rangeData={rangeData} isPortrait={isPortrait} />
</div>
</div>
);
} else if (isSmallDevice) {
Expand Down Expand Up @@ -125,9 +122,6 @@ const SankeyGraph: FC<Props> = ({ height, txHash, isLoading, data, rangeData, er
<Loader title="Loading Sankey Diagram..." />
</div>
)}
<div className="flex w-full flex-row justify-end bg-dune-50 p-1 font-mono">
<DataRange rangeData={rangeData} isPortrait={isPortrait} />
</div>
</div>
);
} else {
Expand Down Expand Up @@ -185,9 +179,6 @@ const SankeyGraph: FC<Props> = ({ height, txHash, isLoading, data, rangeData, er
<Loader title="Loading Sankey Diagram..." />
</div>
)}
<div className="mt-4 flex w-full flex-row justify-end border-t border-t-dune-200 bg-dune-50 p-1 font-mono">
<DataRange rangeData={rangeData} isPortrait={isPortrait} />
</div>
</div>
);
}
Expand Down
3 changes: 2 additions & 1 deletion utils/clickhouse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ export const client = createClient({
host: process.env.CLICKHOUSE_HOST ?? "http://localhost:8123",
username: process.env.CLICKHOUSE_USER ?? "default",
password: process.env.CLICKHOUSE_PASSWORD ?? "",
});
database: process.env.CLICKHOUSE_DATABASE ?? "default",
});