feat: redesign typed rice poster editor
Verify mini program and deploy preview / verify-deploy (push) Successful in 3m57s
Verify mini program and deploy preview / verify-deploy (push) Successful in 3m57s
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
const API_BASE = process.env.API_INTERNAL_URL || 'http://pk-lab-api:8000';
|
||||
async function forward(request, context) {
|
||||
async function forward(request:Request, context:{params:Promise<{path:string[]}>}):Promise<Response> {
|
||||
const { path } = await context.params;
|
||||
const incoming = new URL(request.url);
|
||||
const target = new URL(`/api/${path.join('/')}${incoming.search}`, API_BASE);
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
export function GET() { return Response.json({ status: 'ok' }); }
|
||||
@@ -0,0 +1 @@
|
||||
export function GET():Response { return Response.json({ status: 'ok' }); }
|
||||
@@ -1,4 +0,0 @@
|
||||
import './globals.css';
|
||||
export const metadata = { title: '本命饭 PK', description: '各种各样的饭,二选一。' };
|
||||
export const viewport = { width: 'device-width', initialScale: 1, themeColor: '#fff8f2' };
|
||||
export default function RootLayout({ children }) { return <html lang="zh-CN"><body>{children}</body></html>; }
|
||||
@@ -0,0 +1,6 @@
|
||||
import './globals.css';
|
||||
import type { Metadata, Viewport } from 'next';
|
||||
import type { ReactNode } from 'react';
|
||||
export const metadata:Metadata = { title: '本命饭 PK', description: '各种各样的饭,二选一。' };
|
||||
export const viewport:Viewport = { width: 'device-width', initialScale: 1, themeColor: '#fff8f2' };
|
||||
export default function RootLayout({ children }:{children:ReactNode}) { return <html lang="zh-CN"><body>{children}</body></html>; }
|
||||
@@ -1,2 +0,0 @@
|
||||
import RiceHome from '../components/RiceHome';
|
||||
export default function HomePage() { return <RiceHome />; }
|
||||
@@ -0,0 +1,2 @@
|
||||
import RiceHome from '../components/RiceHome';
|
||||
export default function HomePage():React.ReactElement { return <RiceHome />; }
|
||||
@@ -1,2 +0,0 @@
|
||||
import RicePosterEditor from '../../../components/RicePosterEditor';
|
||||
export default async function ResultPage({ params }) { const { id } = await params; return <RicePosterEditor runId={id} />; }
|
||||
@@ -0,0 +1,2 @@
|
||||
import RicePosterEditor from '../../../components/RicePosterEditor';
|
||||
export default async function ResultPage({ params }:{params:Promise<{id:string}>}) { const { id } = await params; return <RicePosterEditor runId={id} />; }
|
||||
@@ -1,2 +0,0 @@
|
||||
import RiceArena from '../../components/RiceArena';
|
||||
export default function TestPage() { return <RiceArena />; }
|
||||
@@ -0,0 +1,2 @@
|
||||
import RiceArena from '../../components/RiceArena';
|
||||
export default function TestPage():React.ReactElement { return <RiceArena />; }
|
||||
Reference in New Issue
Block a user