fix: remove backend placeholders

This commit is contained in:
2026-03-12 21:10:00 +01:00
parent 0578b26241
commit b71d32da5e
5 changed files with 4 additions and 100 deletions

View File

@@ -194,16 +194,6 @@ export function CanvasPage({ projectId }: CanvasPageProps) {
graphRef.current.nodes = nodes
graphRef.current.edges = edges
const [apiTodosCount, setApiTodosCount] = React.useState<number | null>(null)
React.useEffect(() => {
fetch('/api/todos')
.then((r) => r.json())
.then((data: unknown) => {
if (Array.isArray(data)) setApiTodosCount(data.length)
})
.catch(() => setApiTodosCount(-1))
}, [])
const pendingChangesRef = useRef<NodeChange<Node>[]>([])
const rafRef = useRef<number | null>(null)
const onNodesChange = useCallback(
@@ -644,11 +634,6 @@ export function CanvasPage({ projectId }: CanvasPageProps) {
canCopy={selectedNodes.length === 1}
onFitView={() => flowActionsRef.current?.fitView?.()}
/>
{apiTodosCount !== null && (
<div className="shrink-0 px-3 py-1 text-xs text-muted-foreground border-b border-border/50">
Backend API: {apiTodosCount >= 0 ? `${apiTodosCount} todos` : 'unavailable'}
</div>
)}
<div className="flex-1 min-h-0 relative flex flex-col">
<div className="flex-1 min-h-0 flex flex-col">
<GraphContext.Provider value={graphContextValue}>

View File

@@ -8,14 +8,6 @@ export default defineConfig({
server: {
proxy: {
// Backend API (dev): proxy to avoid CORS
'/api/todos': {
target: 'http://localhost:8080',
changeOrigin: true,
},
'/api/todos/': {
target: 'http://localhost:8080',
changeOrigin: true,
},
'/health': {
target: 'http://localhost:8080',
changeOrigin: true,