Files
klz-cables.com/.pnpm-store/v10/files/f2/fa4759f9029e4e07955f39a219e34576aa92d34953d3a046682989510019c992292c4d66a9787d31de6572d0cc3e40c24b9ee8177ac296c160f317891d3d20
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

63 lines
1.4 KiB
Plaintext

'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx } from "react/jsx-runtime";
import { usePathname } from 'next/navigation.js';
import { formatAdminURL } from 'payload/shared';
import React from 'react';
import { useAuth } from '../../providers/Auth/index.js';
import { useConfig } from '../../providers/Config/index.js';
import { DefaultAccountIcon } from './Default/index.js';
import { GravatarAccountIcon } from './Gravatar/index.js';
export const Account = () => {
const $ = _c(3);
const {
config: t0
} = useConfig();
const {
admin: t1,
routes: t2
} = t0;
const {
avatar,
routes: t3
} = t1;
const {
account: accountRoute
} = t3;
const {
admin: adminRoute
} = t2;
const {
user
} = useAuth();
const pathname = usePathname();
const isOnAccountPage = pathname === formatAdminURL({
adminRoute,
path: accountRoute
});
if (!user?.email || avatar === "default") {
let t4;
if ($[0] !== isOnAccountPage) {
t4 = _jsx(DefaultAccountIcon, {
active: isOnAccountPage
});
$[0] = isOnAccountPage;
$[1] = t4;
} else {
t4 = $[1];
}
return t4;
}
if (avatar === "gravatar") {
let t4;
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
t4 = _jsx(GravatarAccountIcon, {});
$[2] = t4;
} else {
t4 = $[2];
}
return t4;
}
};
//# sourceMappingURL=index.js.map