typescript-typenfehler behoben.. npm run lint läuft nun fehlerfrei durch.
This commit is contained in:
@@ -110,7 +110,10 @@ export default function Dashboard() {
|
||||
const page = usePage<SharedData & DashboardPageProps>();
|
||||
const { metrics, upcomingEvents, recentPurchases, latestPurchase, tenant, emailVerification, locale, onboarding } = page.props;
|
||||
const { auth, supportedLocales } = page.props;
|
||||
const translations = (page.props.translations?.dashboard ?? {}) as Record<string, unknown>;
|
||||
const translations = useMemo(
|
||||
() => (page.props.translations?.dashboard ?? {}) as Record<string, unknown>,
|
||||
[page.props.translations?.dashboard],
|
||||
);
|
||||
|
||||
const [verificationSent, setVerificationSent] = useState(false);
|
||||
const [sendingVerification, setSendingVerification] = useState(false);
|
||||
@@ -285,7 +288,7 @@ export default function Dashboard() {
|
||||
|
||||
try {
|
||||
return currencyFormatter.format(price);
|
||||
} catch (error) {
|
||||
} catch {
|
||||
return `${price.toFixed(2)} €`;
|
||||
}
|
||||
};
|
||||
@@ -669,4 +672,4 @@ export default function Dashboard() {
|
||||
);
|
||||
}
|
||||
|
||||
(Dashboard as any).layout = (page: ReactNode) => page;
|
||||
Object.assign(Dashboard, { layout: (page: ReactNode) => page });
|
||||
|
||||
Reference in New Issue
Block a user