feat: advanced tab platform wrapper (#16941)

* fixed error in advanced tab atom build

-- used `DOMPurify` instead of `sanitize-html`

* hide BookerLayoutSelector for platform and removePlatformClientIdFromEmail

* fixup! Merge branch 'main' into event-advanced-platform-wrapper

* undo linting changes

* undo linting changes

* fix: active state of tabs items

---------

Co-authored-by: Morgan <[email protected]>
Co-authored-by: Morgan Vernay <[email protected]>
This commit is contained in:
authored and GitHub committed 2024-10-10 17:09:03 +03:00
1 parent 1f08bc5a4f
commit 99caae8665
17 files changed
+208 -101

No files matched your search

@@ -18,6 +18,8 @@ export type HorizontalTabItemProps = {
linkScroll?: boolean;
icon?: IconName;
avatar?: string;
onClick?: (name: string) => void;
isActive?: boolean;
};
const HorizontalTabItem = function ({
@@ -30,10 +32,16 @@ const HorizontalTabItem = function ({
}: HorizontalTabItemProps) {
const { t, isLocaleReady } = useLocale();
const isCurrent = useUrlMatchesCurrentUrl(href);
const isCurrent = useUrlMatchesCurrentUrl(href) || props?.isActive;
return (
<Link
onClick={(e) => {
if (props.onClick) {
e.preventDefault();
props.onClick(name);
}
}}
key={name}
href={href}
shallow={linkShallow}
@@ -26,6 +26,7 @@ export type VerticalTabItemProps = {
avatar?: string;
iconClassName?: string;
onClick?: (name: string) => void;
isActive?: boolean;
};
const VerticalTabItem = ({
@@ -39,7 +40,7 @@ const VerticalTabItem = ({
...props
}: VerticalTabItemProps) => {
const { t } = useLocale();
const isCurrent = useUrlMatchesCurrentUrl(href);
const isCurrent = useUrlMatchesCurrentUrl(href) || props?.isActive;
return (
<Fragment key={name}>