@omniumretail/component-library 1.2.89 → 1.2.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -25700,7 +25700,9 @@ const Header = ({
|
|
|
25700
25700
|
customLogoClass,
|
|
25701
25701
|
companyName = "omnium",
|
|
25702
25702
|
onSupportSubmit,
|
|
25703
|
-
applicationOptions
|
|
25703
|
+
applicationOptions,
|
|
25704
|
+
onProfileClick,
|
|
25705
|
+
onHomeClick
|
|
25704
25706
|
}) => {
|
|
25705
25707
|
const [isMenuOpen, setIsMenuOpen] = useState(false);
|
|
25706
25708
|
const [activeDropdown, setActiveDropdown] = useState(null);
|
|
@@ -25720,26 +25722,19 @@ const Header = ({
|
|
|
25720
25722
|
const onProfile = () => {
|
|
25721
25723
|
if (shouldConfirmNavigation) {
|
|
25722
25724
|
onLeavingPage("/profile");
|
|
25725
|
+
} else if (onProfileClick) {
|
|
25726
|
+
onProfileClick();
|
|
25723
25727
|
} else {
|
|
25724
|
-
|
|
25725
|
-
if (window.top && window.top !== window.self) {
|
|
25726
|
-
console.log("📍 Navigating to profile1:", profileUrl);
|
|
25727
|
-
window.top.location.href = profileUrl;
|
|
25728
|
-
} else {
|
|
25729
|
-
console.log("📍 Navigating to profile2:", profileUrl);
|
|
25730
|
-
window.location.href = profileUrl;
|
|
25731
|
-
}
|
|
25728
|
+
window.location.href = profileUrl;
|
|
25732
25729
|
}
|
|
25733
25730
|
};
|
|
25734
25731
|
const onHome = () => {
|
|
25735
25732
|
if (shouldConfirmNavigation) {
|
|
25736
25733
|
onLeavingPage("/home");
|
|
25734
|
+
} else if (onHomeClick) {
|
|
25735
|
+
onHomeClick();
|
|
25737
25736
|
} else {
|
|
25738
|
-
|
|
25739
|
-
window.top.location.href = homeUrl;
|
|
25740
|
-
} else {
|
|
25741
|
-
window.location.href = homeUrl;
|
|
25742
|
-
}
|
|
25737
|
+
window.location.href = homeUrl;
|
|
25743
25738
|
}
|
|
25744
25739
|
};
|
|
25745
25740
|
const onSupport = () => {
|