diff --git a/components/Breadcrumbs.tsx b/components/Breadcrumbs.tsx index a6cdae79e0..090a1321ae 100644 --- a/components/Breadcrumbs.tsx +++ b/components/Breadcrumbs.tsx @@ -12,7 +12,7 @@ export type BreadcrumbT = { type Props = {} export const Breadcrumbs = (props: Props) => { const router = useRouter() - const pathWithLocale = `/${router.locale}${router.asPath}` + const pathWithLocale = `/${router.locale}${router.asPath.split('?')[0]}` // remove query string const { breadcrumbs } = useMainContext() return ( diff --git a/components/HeaderNotifications.tsx b/components/HeaderNotifications.tsx index 4e6d296af2..735b87576f 100644 --- a/components/HeaderNotifications.tsx +++ b/components/HeaderNotifications.tsx @@ -70,7 +70,7 @@ export const HeaderNotifications = () => { return ( <> {allNotifications.map(({ type, content }, i) => { - const isLast = i !== allNotifications.length - 1 + const isLast = i === allNotifications.length - 1 return (
{ return (
- + {selectedLang.nativeName || selectedLang.name} diff --git a/components/ScrollButton.tsx b/components/ScrollButton.tsx index 7694e9a2ae..a32bd2fc60 100644 --- a/components/ScrollButton.tsx +++ b/components/ScrollButton.tsx @@ -45,17 +45,6 @@ export const ScrollButton = () => { > -
) } diff --git a/components/TruncateLines.tsx b/components/TruncateLines.tsx index 7f29bdb707..f2685ddad1 100644 --- a/components/TruncateLines.tsx +++ b/components/TruncateLines.tsx @@ -8,14 +8,15 @@ type Props = { className?: string } export const TruncateLines = (props: Props) => { - const Component = props.as || 'div' + const { as, maxLines, className, children } = props + const Component = as || 'div' return ( - - {props.children} + + {children}