Replace all class components with function components and move server-state
polling to @tanstack/react-query.
- add @tanstack/react-query; generate query helpers via the hey-api
@tanstack/react-query plugin (src/client/@tanstack)
- QueryClientProvider + one-time client.setConfig({ baseUrl: '' }) in index.tsx
- App polls statistics with useQuery(getStatisticsOptions, refetchInterval),
DataProcessingPlot uses getPreviewPlotOptions; manual setInterval polling gone
- memo() on presentational children; with TanStack structural sharing this
re-renders a child only when its own statistics slice changes
- PreviewImage stays imperative (binary JPEG -> object URL) using useEffect +
a ref for the object-URL lifecycle
- fix AzIntSettings correction checkboxes that mutated state in place (relied on
the poll re-render); they now use setState
- drop dead code uncovered during the port (unused upload/deactivate handlers
and imports in ImageFormatSettings, DetectorSettings, ROI)
Build (tsc + vite) passes; dev server transforms all entry modules.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
19 lines
423 B
TypeScript
19 lines
423 B
TypeScript
import { defineConfig } from '@hey-api/openapi-ts';
|
|
|
|
export default defineConfig({
|
|
input: '../broker/jfjoch_api.yaml',
|
|
output: {
|
|
path: 'src/client',
|
|
},
|
|
plugins: [
|
|
'@hey-api/client-fetch',
|
|
{
|
|
name: '@hey-api/typescript',
|
|
case: 'preserve',
|
|
enums: { mode: 'javascript' },
|
|
},
|
|
'@hey-api/sdk',
|
|
'@tanstack/react-query',
|
|
],
|
|
});
|