refactor: 封装请求

This commit is contained in:
2026-05-09 09:25:13 +08:00
parent 765b84e2b4
commit 7bed43ac96
19 changed files with 195 additions and 108 deletions

View File

@@ -0,0 +1,24 @@
import type { ReactNode } from "react";
type PlayerAppShellProps = {
children: ReactNode;
};
/**
* 玩家端业务区外壳:顶栏 + 主内容(移动端宽度上限,桌面居中)。
* 标题 / 底部导航等后续再接 i18n、路由。
*/
export function PlayerAppShell({ children }: PlayerAppShellProps): ReactNode {
return (
<div className="flex min-h-full flex-col bg-background text-foreground">
<header className="sticky top-0 z-40 shrink-0 border-b border-border bg-background/95 backdrop-blur-sm supports-[backdrop-filter]:bg-background/80">
<div className="mx-auto flex h-12 max-w-lg items-center px-4">
<span className="text-sm font-semibold tracking-tight">Lottery</span>
</div>
</header>
<main className="mx-auto flex w-full max-w-lg flex-1 flex-col gap-4 px-4 py-4">
{children}
</main>
</div>
);
}