Files
klz-cables.com/.pnpm-store/v10/files/d6/e8b65636450c05ca9e6cf9b9c1e991427e069cd2f881348dd4d7ded8cf4b03d1cf68ae82b68c8dbdda7d13e5eb53bb2430ac5ee9de5780c9176288e908bb6b
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

83 lines
2.2 KiB
Plaintext

import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Button, Link } from '@payloadcms/ui';
import { Translation } from '@payloadcms/ui/shared';
import { formatAdminURL } from 'payload/shared';
import React from 'react';
import { FormHeader } from '../../elements/FormHeader/index.js';
import { ResetPasswordForm } from './ResetPasswordForm/index.js';
export const resetPasswordBaseClass = 'reset-password';
export function ResetPassword({
initPageResult,
params
}) {
const {
req
} = initPageResult;
const {
segments: [_, token]
} = params;
const {
i18n,
payload: {
config
},
user
} = req;
const {
admin: {
routes: {
account: accountRoute,
login: loginRoute
}
},
routes: {
admin: adminRoute
}
} = config;
if (user) {
return /*#__PURE__*/_jsxs("div", {
className: `${resetPasswordBaseClass}__wrap`,
children: [/*#__PURE__*/_jsx(FormHeader, {
description: /*#__PURE__*/_jsx(Translation, {
elements: {
'0': ({
children
}) => /*#__PURE__*/_jsx(Link, {
href: formatAdminURL({
adminRoute,
path: accountRoute
}),
prefetch: false,
children: children
})
},
i18nKey: "authentication:loggedInChangePassword",
t: i18n.t
}),
heading: i18n.t('authentication:alreadyLoggedIn')
}), /*#__PURE__*/_jsx(Button, {
buttonStyle: "secondary",
el: "link",
size: "large",
to: adminRoute,
children: i18n.t('general:backToDashboard')
})]
});
}
return /*#__PURE__*/_jsxs("div", {
className: `${resetPasswordBaseClass}__wrap`,
children: [/*#__PURE__*/_jsx(FormHeader, {
heading: i18n.t('authentication:resetPassword')
}), /*#__PURE__*/_jsx(ResetPasswordForm, {
token: token
}), /*#__PURE__*/_jsx(Link, {
href: formatAdminURL({
adminRoute,
path: loginRoute
}),
prefetch: false,
children: i18n.t('authentication:backToLogin')
})]
});
}
//# sourceMappingURL=index.js.map