fix: code splitting, route errors, Sentry CI source maps
- Lazy-import CreateRoomForm/CreateSpaceForm in CreateRoom.tsx and Create.tsx so create-room and create-space get their own chunks; eliminates INEFFECTIVE_DYNAMIC_IMPORT warnings - Add RouteError component wired to root route errorElement so crashes show a reload button instead of React Router dev screen - ci.yml: use secrets.SENTRY_AUTH_TOKEN so source maps upload on CI builds Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
8b84780d11
commit
3927f01089
@@ -7,9 +7,12 @@ import {
|
||||
PageHero,
|
||||
PageHeroSection,
|
||||
} from '../../../components/page';
|
||||
import { CreateSpaceForm } from '../../../features/create-space';
|
||||
import { useRoomNavigate } from '../../../hooks/useRoomNavigate';
|
||||
|
||||
const CreateSpaceForm = React.lazy(() =>
|
||||
import('../../../features/create-space').then((m) => ({ default: m.CreateSpaceForm })),
|
||||
);
|
||||
|
||||
export function Create() {
|
||||
const { navigateSpace } = useRoomNavigate();
|
||||
|
||||
@@ -26,7 +29,9 @@ export function Create() {
|
||||
title="Create Space"
|
||||
subTitle="Build a space for your community."
|
||||
/>
|
||||
<CreateSpaceForm onCreate={navigateSpace} />
|
||||
<React.Suspense fallback={null}>
|
||||
<CreateSpaceForm onCreate={navigateSpace} />
|
||||
</React.Suspense>
|
||||
</Box>
|
||||
</PageHeroSection>
|
||||
</PageContentCenter>
|
||||
|
||||
Reference in New Issue
Block a user