typescript-typenfehler behoben.. npm run lint läuft nun fehlerfrei durch.

This commit is contained in:
Codex Agent
2025-11-22 11:49:47 +01:00
parent 6c78d7e281
commit eb41cb6194
74 changed files with 469 additions and 396 deletions

View File

@@ -1,5 +1,4 @@
import React from 'react';
import { usePage } from '@inertiajs/react';
import Header from './Header';
import Footer from './Footer';
@@ -10,8 +9,6 @@ interface AppLayoutProps {
}
const AppLayout: React.FC<AppLayoutProps> = ({ children, header, footer }) => {
const { auth } = usePage().props;
return (
<div className="min-h-screen bg-background text-foreground">
{header || <Header />}
@@ -21,4 +18,4 @@ const AppLayout: React.FC<AppLayoutProps> = ({ children, header, footer }) => {
);
};
export default AppLayout;
export default AppLayout;

View File

@@ -26,7 +26,7 @@ import {
} from '@/components/ui/navigation-menu';
const Header: React.FC = () => {
const { auth } = usePage().props as any;
const { auth } = usePage<{ auth: { user?: { name?: string; email?: string; avatar?: string } } }>().props;
const { t } = useTranslation('auth');
const { appearance, updateAppearance } = useAppearance();
const { localizedPath } = useLocalizedRoutes();
@@ -77,7 +77,6 @@ const Header: React.FC = () => {
const ctaHref = localizedPath('/demo');
const navItems = useMemo(() => {
const homeHref = localizedPath('/');
const howItWorksHref = localizedPath('/so-funktionierts');
return [

View File

@@ -7,25 +7,28 @@ import Footer from '@/layouts/app/Footer';
import { useAppearance } from '@/hooks/use-appearance';
import { Button } from '@/components/ui/button';
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuTrigger } from '@/components/ui/dropdown-menu';
import { MoreHorizontal, Sun, Moon, Languages, LayoutDashboard, LogOut, LogIn, UserPlus } from 'lucide-react';
import { MoreHorizontal, Sun, Moon, Languages, LayoutDashboard, LogOut, LogIn } from 'lucide-react';
interface MarketingLayoutProps {
children: React.ReactNode;
title?: string;
}
type PageProps = {
translations?: Record<string, Record<string, string>>;
locale?: string;
analytics?: { matomo?: MatomoConfig };
supportedLocales?: string[];
appUrl?: string;
auth?: { user?: { name?: string; email?: string } };
};
const MarketingLayout: React.FC<MarketingLayoutProps> = ({ children, title }) => {
const page = usePage<{
translations?: Record<string, Record<string, string>>;
locale?: string;
analytics?: { matomo?: MatomoConfig };
supportedLocales?: string[];
appUrl?: string;
}>();
const page = usePage<PageProps>();
const { url } = page;
const { t } = useTranslation('marketing');
const i18n = useTranslation();
const { locale, analytics, supportedLocales = ['de', 'en'], appUrl, auth } = page.props as any;
const { locale, analytics, supportedLocales = ['de', 'en'], appUrl, auth } = page.props;
const user = auth?.user ?? null;
const { localizedPath } = useLocalizedRoutes();
const { appearance, updateAppearance } = useAppearance();