Regenerate example code + fix broken paths from repo restructure
- Fix testapp/apps.py: import djarea_clients (file was never renamed) - Fix fetch.mjs: command is export_djarea_schema not export_mizan_schema - Fix harness package.json: dependency path to mizan-react after restructure - Add package.json for generator (openapi-typescript dependency) - Regenerate all example code with new protocol format: - generated.provider.tsx uses raw context responses + SSR hydration - generated.server.ts uses GET /ctx/global/ with response.ok check - generated.forms.ts, channels.ts, channels.hooks.tsx refreshed - Remove stale generated.django.tsx and generated.django.server.ts - Update imports: fixtures.tsx and main.tsx import from ./api (index) - Use MizanContext instead of deprecated DjangoContext in examples Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -11,7 +11,7 @@ import { useState, useEffect, useRef } from 'react'
|
||||
|
||||
// Generated typed hooks — the actual mizan API
|
||||
import {
|
||||
DjangoContext,
|
||||
MizanContext,
|
||||
useEcho,
|
||||
useAdd,
|
||||
useMultiply,
|
||||
@@ -25,9 +25,9 @@ import {
|
||||
useCurrentUser,
|
||||
DjangoError,
|
||||
useMizan,
|
||||
} from './api/generated.django'
|
||||
useChatChannel,
|
||||
} from './api'
|
||||
import { useContactForm, useLoginForm } from './api/generated.forms'
|
||||
import { useChatChannel } from './api/generated.channels.hooks'
|
||||
|
||||
// ─── Fixture router ─────────────────────────────────────────────────────────
|
||||
|
||||
@@ -228,7 +228,7 @@ function FormContactSubmit() {
|
||||
// ─── Channel fixtures ───────────────────────────────────────────────────────
|
||||
|
||||
function ChannelChatFixture() {
|
||||
// DjangoContext already includes ChannelProvider
|
||||
// MizanContext already includes ChannelProvider
|
||||
return <ChannelChat />
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user