diff --git a/apps/web/app/[locale]/settings/layout.tsx b/apps/web/app/[locale]/settings/layout.tsx index b7f9eeb22..92570dc47 100644 --- a/apps/web/app/[locale]/settings/layout.tsx +++ b/apps/web/app/[locale]/settings/layout.tsx @@ -12,16 +12,21 @@ import React from 'react'; import { useRecoilState, useRecoilValue } from 'recoil'; import { clsxm } from '@app/utils'; import { withAuthentication } from 'lib/app/authenticator'; +import { usePathname } from 'next/navigation'; const SettingsLayout = ({ children }: { children: JSX.Element }) => { const t = useTranslations(); const [user] = useRecoilState(userState); const fullWidth = useRecoilValue(fullWidthState); - + const pathName = usePathname(); + const getEndPath: any = pathName?.split('settings/')[1]; + const endWord: 'TEAM' | 'PERSONAL' = getEndPath?.toUpperCase(); const breadcrumb = [ { title: JSON.parse(t('pages.home.BREADCRUMB')), href: '/' }, - { title: JSON.parse(t('pages.settings.BREADCRUMB')), href: '/settings/personnal' } + { title: t('common.SETTINGS'), href: pathName as string }, + { title: t(`common.${endWord}`), href: pathName as string } ]; + if (!user) { return ; } else { @@ -33,15 +38,13 @@ const SettingsLayout = ({ children }: { children: JSX.Element }) => {
- {/*
*/} + className={clsxm('w-full mt-4 flex flex-row items-center justify-start gap-8')} + > - - {/*
*/} +