2025-12-30 09:21:41 +08:00
|
|
|
'use client'
|
|
|
|
|
|
2026-03-10 17:02:37 +08:00
|
|
|
import { TanStackDevtools } from '@tanstack/react-devtools'
|
|
|
|
|
import { formDevtoolsPlugin } from '@tanstack/react-form-devtools'
|
2025-12-30 09:21:41 +08:00
|
|
|
|
2026-03-10 17:02:37 +08:00
|
|
|
import { ReactQueryDevtoolsPanel } from '@tanstack/react-query-devtools'
|
|
|
|
|
import { IS_DEV } from '@/config'
|
2025-12-30 09:21:41 +08:00
|
|
|
|
|
|
|
|
export const TanStackDevtoolsLoader = () => {
|
|
|
|
|
if (!IS_DEV)
|
|
|
|
|
return null
|
|
|
|
|
|
|
|
|
|
return (
|
2026-03-10 17:02:37 +08:00
|
|
|
<TanStackDevtools
|
|
|
|
|
plugins={[
|
|
|
|
|
// Query Devtools (Official Plugin)
|
|
|
|
|
{
|
|
|
|
|
name: 'React Query',
|
|
|
|
|
render: () => <ReactQueryDevtoolsPanel />,
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// Form Devtools (Official Plugin)
|
|
|
|
|
formDevtoolsPlugin(),
|
|
|
|
|
]}
|
|
|
|
|
/>
|
2025-12-30 09:21:41 +08:00
|
|
|
)
|
|
|
|
|
}
|