codex has reworked checkout, but frontend doesnt work
This commit is contained in:
@@ -1,17 +1,19 @@
|
||||
import React from 'react';
|
||||
import React from 'react';
|
||||
import { usePage, router } from '@inertiajs/react';
|
||||
import { Head } from '@inertiajs/react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import MarketingLayout from '@/layouts/marketing/MarketingLayout';
|
||||
import { Loader } from 'lucide-react';
|
||||
import { useLocalizedRoutes } from '@/hooks/useLocalizedRoutes';
|
||||
|
||||
const Success: React.FC = () => {
|
||||
const { auth, flash } = usePage().props as any;
|
||||
const { auth } = usePage().props as any;
|
||||
const { t } = useTranslation('success');
|
||||
const { localizedPath } = useLocalizedRoutes();
|
||||
|
||||
if (auth.user && auth.user.email_verified_at) {
|
||||
// Redirect to admin
|
||||
router.visit('/admin', { preserveState: false });
|
||||
|
||||
return (
|
||||
<div className="flex items-center justify-center min-h-screen bg-gray-50">
|
||||
<div className="text-center">
|
||||
@@ -28,12 +30,8 @@ const Success: React.FC = () => {
|
||||
<div className="min-h-screen flex items-center justify-center bg-gray-50 py-12 px-4 sm:px-6 lg:px-8">
|
||||
<div className="max-w-md w-full bg-white rounded-lg shadow-md p-8">
|
||||
<div className="text-center">
|
||||
<h2 className="text-2xl font-bold text-gray-900 mb-4">
|
||||
{t('verify_email')}
|
||||
</h2>
|
||||
<p className="text-gray-600 mb-6">
|
||||
{t('check_email')}
|
||||
</p>
|
||||
<h2 className="text-2xl font-bold text-gray-900 mb-4">{t('verify_email')}</h2>
|
||||
<p className="text-gray-600 mb-6">{t('check_email')}</p>
|
||||
<form method="POST" action="/email/verification-notification">
|
||||
<button
|
||||
type="submit"
|
||||
@@ -43,7 +41,10 @@ const Success: React.FC = () => {
|
||||
</button>
|
||||
</form>
|
||||
<p className="mt-4 text-sm text-gray-600">
|
||||
{t('already_registered')} <a href="/login" className="text-blue-600 hover:text-blue-500">{t('login')}</a>
|
||||
{t('already_registered')}{' '}
|
||||
<a href={localizedPath('/login')} className="text-blue-600 hover:text-blue-500">
|
||||
{t('login')}
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -57,20 +58,19 @@ const Success: React.FC = () => {
|
||||
<div className="min-h-screen flex items-center justify-center bg-gray-50 py-12 px-4 sm:px-6 lg:px-8">
|
||||
<div className="max-w-md w-full bg-white rounded-lg shadow-md p-8">
|
||||
<div className="text-center">
|
||||
<h2 className="text-2xl font-bold text-gray-900 mb-4">
|
||||
{t('complete_purchase')}
|
||||
</h2>
|
||||
<p className="text-gray-600 mb-6">
|
||||
{t('login_to_continue')}
|
||||
</p>
|
||||
<h2 className="text-2xl font-bold text-gray-900 mb-4">{t('complete_purchase')}</h2>
|
||||
<p className="text-gray-600 mb-6">{t('login_to_continue')}</p>
|
||||
<a
|
||||
href="/login"
|
||||
href={localizedPath('/login')}
|
||||
className="bg-blue-600 hover:bg-blue-700 text-white px-6 py-2 rounded-md font-medium transition duration-300 block mb-2"
|
||||
>
|
||||
{t('login')}
|
||||
</a>
|
||||
<p className="text-sm text-gray-600">
|
||||
{t('no_account')} <a href="/register" className="text-blue-600 hover:text-blue-500">{t('register')}</a>
|
||||
{t('no_account')}{' '}
|
||||
<a href={localizedPath('/register')} className="text-blue-600 hover:text-blue-500">
|
||||
{t('register')}
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user