fix: Resolve TypeScript build errors for production deployment
- Add type assertion for SurrealDB query results in debug/nodes route - Install @types/three for Three.js type definitions - Exclude tests directory from TypeScript compilation - Wrap useSearchParams in Suspense boundary on login page (Next.js 16 requirement) All routes now build successfully for production deployment. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -33,7 +33,7 @@ export async function GET(request: NextRequest) {
|
||||
WHERE user_did = $userDid
|
||||
`;
|
||||
const results = await db.query(nodesQuery, { userDid });
|
||||
const nodes = results[0] || [];
|
||||
const nodes = (results[0] || []) as any[];
|
||||
|
||||
// Count stats
|
||||
const stats = {
|
||||
|
||||
@@ -10,10 +10,10 @@ import {
|
||||
Text,
|
||||
} from '@mantine/core';
|
||||
import { useForm } from '@mantine/form';
|
||||
import { useState } from 'react';
|
||||
import { useState, Suspense } from 'react';
|
||||
import { useSearchParams } from 'next/navigation';
|
||||
|
||||
export default function LoginPage() {
|
||||
function LoginForm() {
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const searchParams = useSearchParams();
|
||||
const error = searchParams.get('error');
|
||||
@@ -89,3 +89,17 @@ export default function LoginPage() {
|
||||
</Center>
|
||||
);
|
||||
}
|
||||
|
||||
export default function LoginPage() {
|
||||
return (
|
||||
<Suspense fallback={
|
||||
<Center h="100vh">
|
||||
<Paper w={400} p="xl">
|
||||
<Title order={2} ta="center">Loading...</Title>
|
||||
</Paper>
|
||||
</Center>
|
||||
}>
|
||||
<LoginForm />
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user