Seite läuft wieder, menü bringt keine fehler mehr
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import React from 'react';
|
||||
import { Head, Link } from '@inertiajs/react';
|
||||
import { Head, Link, usePage } from '@inertiajs/react';
|
||||
import MarketingLayout from '@/layouts/MarketingLayout';
|
||||
import { usePage } from '@inertiajs/react';
|
||||
import { useLocalizedRoutes } from '@/hooks/useLocalizedRoutes';
|
||||
|
||||
const Datenschutz: React.FC = () => {
|
||||
const { props } = usePage();
|
||||
const { __ } = props as any; // Für i18n
|
||||
const { localizedPath } = useLocalizedRoutes();
|
||||
|
||||
return (
|
||||
<MarketingLayout title={__('legal.datenschutz_title')}>
|
||||
@@ -21,7 +22,7 @@ const Datenschutz: React.FC = () => {
|
||||
</p>
|
||||
<p className="mb-4 font-sans-marketing">{__('legal.data_retention')}</p>
|
||||
<p className="mb-4 font-sans-marketing">
|
||||
{__('legal.rights')} <Link href="/de/kontakt">{__('legal.contact')}</Link>.
|
||||
{__('legal.rights')} <Link href={localizedPath('/kontakt')}>{__('legal.contact')}</Link>.
|
||||
</p>
|
||||
<p className="mb-4 font-sans-marketing">{__('legal.cookies')}</p>
|
||||
|
||||
|
||||
@@ -14,27 +14,65 @@ interface Props {
|
||||
}
|
||||
|
||||
const Blog: React.FC<Props> = ({ posts }) => {
|
||||
|
||||
const { localizedPath } = useLocalizedRoutes();
|
||||
const { t } = useTranslation('marketing');
|
||||
|
||||
const resolvePaginationHref = React.useCallback(
|
||||
(raw?: string | null) => {
|
||||
if (!raw) {
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
const parsed = new URL(
|
||||
raw,
|
||||
typeof window !== 'undefined' ? window.location.origin : 'http://localhost'
|
||||
);
|
||||
|
||||
const normalized = `${parsed.pathname}${parsed.search}`;
|
||||
return localizedPath(normalized);
|
||||
} catch (error) {
|
||||
console.warn('[Marketing Blog] Fallback resolving pagination link', { raw, error });
|
||||
return localizedPath(raw);
|
||||
}
|
||||
},
|
||||
[localizedPath]
|
||||
);
|
||||
|
||||
const renderPagination = () => {
|
||||
if (!posts.links || posts.links.length <= 3) return null;
|
||||
|
||||
return (
|
||||
<div className="mt-12 text-center">
|
||||
<div className="flex justify-center space-x-2">
|
||||
{posts.links.map((link, index) => (
|
||||
<Link
|
||||
key={index}
|
||||
href={link.url || '#'}
|
||||
className={`px-3 py-2 rounded ${
|
||||
link.active
|
||||
? 'bg-[#FFB6C1] text-white'
|
||||
: 'bg-gray-200 text-gray-700 hover:bg-gray-300'
|
||||
}`}
|
||||
dangerouslySetInnerHTML={{ __html: link.label }}
|
||||
/>
|
||||
))}
|
||||
{posts.links.map((link, index) => {
|
||||
const href = resolvePaginationHref(link.url);
|
||||
|
||||
const baseClasses = `px-3 py-2 rounded ${
|
||||
link.active
|
||||
? 'bg-[#FFB6C1] text-white'
|
||||
: 'bg-gray-200 text-gray-700 hover:bg-gray-300'
|
||||
}`;
|
||||
|
||||
if (!href) {
|
||||
return (
|
||||
<span
|
||||
key={index}
|
||||
className={`${baseClasses} cursor-default`}
|
||||
dangerouslySetInnerHTML={{ __html: link.label }}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<Link
|
||||
key={index}
|
||||
href={href}
|
||||
className={baseClasses}
|
||||
dangerouslySetInnerHTML={{ __html: link.label }}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -56,7 +56,7 @@ const Home: React.FC<Props> = ({ packages }) => {
|
||||
</div>
|
||||
<div className="md:w-1/2">
|
||||
<img
|
||||
src="/images/hero-image.jpg"
|
||||
src="https://via.placeholder.com/600x400/FFB6C1/FFFFFF?text=Fotospiel+Hero"
|
||||
alt={t('home.hero_image_alt')}
|
||||
className="w-full h-auto rounded-lg shadow-lg"
|
||||
/>
|
||||
|
||||
@@ -3,8 +3,8 @@ import { usePage } from "@inertiajs/react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
|
||||
import { useCheckoutWizard } from "../WizardContext";
|
||||
import LoginForm, { AuthUserPayload } from "../../../auth/LoginForm";
|
||||
import RegisterForm, { RegisterSuccessPayload } from "../../../auth/RegisterForm";
|
||||
import LoginForm, { AuthUserPayload } from "../../auth/LoginForm";
|
||||
import RegisterForm, { RegisterSuccessPayload } from "../../auth/RegisterForm";
|
||||
|
||||
interface AuthStepProps {
|
||||
privacyHtml: string;
|
||||
|
||||
@@ -15,12 +15,12 @@ export const ConfirmationStep: React.FC<ConfirmationStepProps> = ({ onViewProfil
|
||||
<Alert>
|
||||
<AlertTitle>Willkommen bei FotoSpiel</AlertTitle>
|
||||
<AlertDescription>
|
||||
Ihr Paket wurde aktiviert. Wir haben Ihnen eine Bestätigung per E-Mail gesendet.
|
||||
{Ihr Paket "" ist aktiviert. Wir haben Ihnen eine Bestaetigung per E-Mail gesendet.}
|
||||
</AlertDescription>
|
||||
</Alert>
|
||||
<div className="flex flex-wrap gap-3 justify-end">
|
||||
<Button variant="outline" onClick={onViewProfile}>
|
||||
Profil öffnen
|
||||
Profil oeffnen
|
||||
</Button>
|
||||
<Button>Zum Admin-Bereich</Button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user