构建报错已经改掉了

This commit is contained in:
Azmat@qq.com
2026-08-19 17:55:28 +08:00
parent a343f47f0c
commit dcd9bf6b5e
3 changed files with 4 additions and 5 deletions
+2 -2
View File
@@ -805,7 +805,7 @@ export function App() {
function renderPage() { function renderPage() {
switch (page) { switch (page) {
case "dashboard": case "dashboard":
return <Dashboard products={products} projects={projects} productTotal={productTotal} projectTotal={projectTotal} billing={billing} userName={currentUser.username} loading={!dataLoaded} navigate={navigate} onCreateProduct={(payload) => action(() => api.createProduct(payload), "")} />; return <Dashboard products={products} projects={projects} productTotal={productTotal} projectTotal={projectTotal} billing={billing} userName={currentUser.username} loading={!dataLoaded} navigate={navigate} />;
case "products": case "products":
return ( return (
<ProductsPage <ProductsPage
@@ -984,7 +984,7 @@ export function App() {
case "settingsNotify": case "settingsNotify":
return <SettingsPage user={currentUser} team={currentTeam} initialSection="notify" preferences={preferences} sessions={sessions} onSavePreferences={savePreferences} onRevokeSession={revokeSession} onRevokeOthers={revokeOtherSessions} onSaveProfile={saveProfile} onChangePassword={changeOwnPassword} onUploadAvatar={uploadOwnAvatar} onResetAvatar={resetOwnAvatar} onNotify={(text) => setNotice({ type: "success", text })} onLogout={logout} />; return <SettingsPage user={currentUser} team={currentTeam} initialSection="notify" preferences={preferences} sessions={sessions} onSavePreferences={savePreferences} onRevokeSession={revokeSession} onRevokeOthers={revokeOtherSessions} onSaveProfile={saveProfile} onChangePassword={changeOwnPassword} onUploadAvatar={uploadOwnAvatar} onResetAvatar={resetOwnAvatar} onNotify={(text) => setNotice({ type: "success", text })} onLogout={logout} />;
default: default:
return <Dashboard products={products} projects={projects} productTotal={productTotal} projectTotal={projectTotal} billing={billing} userName={currentUser.username} loading={!dataLoaded} navigate={navigate} onCreateProduct={(payload) => action(() => api.createProduct(payload), "")} />; return <Dashboard products={products} projects={projects} productTotal={productTotal} projectTotal={projectTotal} billing={billing} userName={currentUser.username} loading={!dataLoaded} navigate={navigate} />;
} }
} }
+2 -2
View File
@@ -100,10 +100,10 @@ export function SettingRow({ title, desc, action, toggle, checked }: { title: st
); );
} }
export function TeamModal({ open, title, subtitle, icon, close, children, footer, dismissable = true }: { export function TeamModal({ open, title, subtitle = "", icon, close, children, footer, dismissable = true }: {
open: boolean; open: boolean;
title: string; title: string;
subtitle: string; subtitle?: string;
icon: ReactNode; icon: ReactNode;
close: () => void; close: () => void;
children: ReactNode; children: ReactNode;
-1
View File
@@ -102,7 +102,6 @@ export function Dashboard({
userName?: string; userName?: string;
loading?: boolean; loading?: boolean;
navigate: NavigateFn; navigate: NavigateFn;
onCreateProduct?: (payload: unknown) => Promise<Product | null | undefined> | void;
}) { }) {
const [tab, setTab] = useState<DashTab>("all"); const [tab, setTab] = useState<DashTab>("all");
const projCount = projectTotal ?? projects.length; const projCount = projectTotal ?? projects.length;