feat: new tooltip

This commit is contained in:
hamster1963
2024-12-07 21:05:02 +08:00
parent 7d61b66762
commit 67124921a6
12 changed files with 187 additions and 64 deletions

View File

@@ -0,0 +1,20 @@
import { createContext } from "react";
export interface TooltipData {
centroid: [number, number];
country: string;
count: number;
servers: Array<{
name: string;
status: boolean;
}>;
}
interface TooltipContextType {
tooltipData: TooltipData | null;
setTooltipData: (data: TooltipData | null) => void;
}
export const TooltipContext = createContext<TooltipContextType | undefined>(
undefined,
);