feat: benchmark detail page

This commit is contained in:
jialin
2026-01-30 18:48:55 +08:00
parent fb0e45ebed
commit 9ab8f233a2
17 changed files with 281 additions and 55 deletions
@@ -0,0 +1,21 @@
import { createContext, useContext } from 'react';
interface DetailContextProps {
detailData: any;
id: number;
loading?: boolean;
}
const DetailContext = createContext<DetailContextProps>(
{} as DetailContextProps
);
export const useDetailContext = () => {
const context = useContext(DetailContext);
if (!context) {
throw new Error('useDetailContext must be used within a DetailProvider');
}
return context;
};
export default DetailContext;