diff --git a/src/app/theme-layouts/layout2/Layout2.js b/src/app/theme-layouts/layout2/Layout2.js
index 185d68d..ff5d8d1 100644
--- a/src/app/theme-layouts/layout2/Layout2.js
+++ b/src/app/theme-layouts/layout2/Layout2.js
@@ -2,9 +2,9 @@ import FuseSuspense from '@fuse/core/FuseSuspense';
import AppContext from 'src/app/contexts/AppContext';
import { selectFuseCurrentLayoutConfig } from 'app/store/fuse/settingsSlice';
import i18next from 'i18next';
-import { memo, useContext } from 'react';
+import { memo, useContext, useEffect } from 'react';
import { useSelector } from 'react-redux';
-import { useRoutes } from 'react-router-dom';
+import { useLocation, useRoutes } from 'react-router-dom';
import { useAuth } from 'src/app/contexts/AuthContext';
import FooterLayout2 from './components/FooterLayout2';
import HeaderLayout2 from './components/HeaderLayout2';
@@ -18,6 +18,16 @@ function Layout2(props) {
const authContext = useAuth();
const appContext = useContext(AppContext);
const { routes } = appContext;
+ const location = useLocation();
+
+ useEffect(() => {
+ const { hash } = location;
+
+ if (hash) {
+ const target = document.querySelector(hash);
+ target.scrollIntoView({ behavior: 'smooth' });
+ }
+ }, [location]);
return (
<>
diff --git a/src/app/theme-layouts/layout2/components/FooterLayout2.js b/src/app/theme-layouts/layout2/components/FooterLayout2.js
index b5d7552..a5c6ca3 100644
--- a/src/app/theme-layouts/layout2/components/FooterLayout2.js
+++ b/src/app/theme-layouts/layout2/components/FooterLayout2.js
@@ -1,7 +1,7 @@
import { memo } from 'react';
import { useTranslation } from 'react-i18next';
import { Link } from 'react-router-dom';
-import linksConfigLayout2 from './linksLayout2Config';
+import NavLinks from './NavLinks';
function FooterLayout2() {
const { t } = useTranslation('layout2');
@@ -35,14 +35,8 @@ function FooterLayout2() {
-
- {linksConfigLayout2.map((path) => (
- -
-
- {t(path)}
-
-
- ))}
+
diff --git a/src/app/theme-layouts/layout2/components/HeaderLayout2.js b/src/app/theme-layouts/layout2/components/HeaderLayout2.js
index f654593..9b14799 100644
--- a/src/app/theme-layouts/layout2/components/HeaderLayout2.js
+++ b/src/app/theme-layouts/layout2/components/HeaderLayout2.js
@@ -2,7 +2,7 @@ import FuseSvgIcon from '@fuse/core/FuseSvgIcon/FuseSvgIcon';
import { memo } from 'react';
import { useTranslation } from 'react-i18next';
import { Link } from 'react-router-dom';
-import linksConfigLayout2 from './linksLayout2Config';
+import Links from './NavLinks';
function HeaderLayout2(props) {
const { t } = useTranslation('layout2');
@@ -19,15 +19,7 @@ function HeaderLayout2(props) {
{props.isAuthenticated || (
diff --git a/src/app/theme-layouts/layout2/components/NavLinks.js b/src/app/theme-layouts/layout2/components/NavLinks.js
new file mode 100644
index 0000000..13a3266
--- /dev/null
+++ b/src/app/theme-layouts/layout2/components/NavLinks.js
@@ -0,0 +1,26 @@
+import { memo } from 'react';
+import { useTranslation } from 'react-i18next';
+import { Link } from 'react-router-dom';
+
+function NavLinks({ className }) {
+ const { t } = useTranslation('layout2');
+
+ return (
+ <>
+
+ {t('rent_and_buy')}
+
+
+ {t('about_us')}
+
+
+ {t('blog')}
+
+
+ {t('contacts')}
+
+ >
+ );
+}
+
+export default memo(NavLinks);
diff --git a/src/app/theme-layouts/layout2/i18n/en.js b/src/app/theme-layouts/layout2/i18n/en.js
index 027a972..65e2830 100644
--- a/src/app/theme-layouts/layout2/i18n/en.js
+++ b/src/app/theme-layouts/layout2/i18n/en.js
@@ -1,6 +1,6 @@
const locale = {
- 'rent-and-buy': 'Rent&Buy Analysis',
- 'about-us': 'About Us',
+ rent_and_buy: 'Rent&Buy Analysis',
+ about_us: 'About Us',
blog: 'Blog',
contacts: 'Contacts',
sign_in: 'Log In',