mirror of
https://github.com/samanhappy/mcphub.git
synced 2025-12-24 02:39:19 -05:00
30 lines
787 B
TypeScript
30 lines
787 B
TypeScript
import React from 'react';
|
|
import { useTranslation } from 'react-i18next';
|
|
import { useNavigate } from 'react-router-dom';
|
|
import ChangePasswordForm from '../components/ChangePasswordForm';
|
|
|
|
const ChangePasswordPage: React.FC = () => {
|
|
const { t } = useTranslation();
|
|
const navigate = useNavigate();
|
|
|
|
const handleSuccess = () => {
|
|
setTimeout(() => {
|
|
navigate('/');
|
|
}, 2000);
|
|
};
|
|
|
|
const handleCancel = () => {
|
|
navigate('/');
|
|
};
|
|
|
|
return (
|
|
<div className="container mx-auto px-4 py-8">
|
|
<div className="max-w-md mx-auto">
|
|
<h1 className="text-2xl font-bold mb-6">{t('auth.changePassword')}</h1>
|
|
<ChangePasswordForm onSuccess={handleSuccess} onCancel={handleCancel} />
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default ChangePasswordPage; |