From 49b4ee44d619156b070c31291b680df450f6331d Mon Sep 17 00:00:00 2001 From: Alexander Morugin Date: Wed, 17 Apr 2024 19:07:53 +0300 Subject: [PATCH 1/2] enhancement_307_fix_routing_at_header_icon --- src/shared/ui/logo/Logo.tsx | 7 +++---- src/widgets/Footer/Footer.tsx | 1 - src/widgets/Header/Header.tsx | 1 - src/widgets/Header/model/slice/headerSlice.tsx | 1 - src/widgets/Header/model/types/types.tsx | 1 - 5 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/shared/ui/logo/Logo.tsx b/src/shared/ui/logo/Logo.tsx index 26f1f99a..058de6f5 100644 --- a/src/shared/ui/logo/Logo.tsx +++ b/src/shared/ui/logo/Logo.tsx @@ -1,5 +1,6 @@ import { type FC } from 'react' +import { Routes } from '@/shared/config/routerConfig/routes' import Link from '@/shared/ui/Link/Link' import styles from './logo.module.scss' @@ -7,22 +8,20 @@ import styles from './logo.module.scss' type TLogoProps = { image: string title: string - url: string width: string height: string } /** * @param {string} image - путь к логотипу на сервере * @param {string} title - лейбл логотипа (и альт) - * @param {string} url - путь ссылки по нажатию на логотип * @param {string} width - ширина логотипа * @param {string} height - высота логотипа */ -const Logo: FC = ({ image, title, url, width, height }) => { +const Logo: FC = ({ image, title, width, height }) => { return (
- + {title}
diff --git a/src/widgets/Footer/Footer.tsx b/src/widgets/Footer/Footer.tsx index 29571da2..dc6fd70e 100644 --- a/src/widgets/Footer/Footer.tsx +++ b/src/widgets/Footer/Footer.tsx @@ -48,7 +48,6 @@ function Footer() { diff --git a/src/widgets/Header/Header.tsx b/src/widgets/Header/Header.tsx index bf140282..a4d1306c 100644 --- a/src/widgets/Header/Header.tsx +++ b/src/widgets/Header/Header.tsx @@ -150,7 +150,6 @@ function Header() { diff --git a/src/widgets/Header/model/slice/headerSlice.tsx b/src/widgets/Header/model/slice/headerSlice.tsx index cedba396..f6ed1465 100644 --- a/src/widgets/Header/model/slice/headerSlice.tsx +++ b/src/widgets/Header/model/slice/headerSlice.tsx @@ -10,7 +10,6 @@ const initialState: CoreBaseHeaderSchema = { header: { main_logo: { image: '', - url: '', title: '' }, support: { diff --git a/src/widgets/Header/model/types/types.tsx b/src/widgets/Header/model/types/types.tsx index 386f9f42..fc8a4142 100644 --- a/src/widgets/Header/model/types/types.tsx +++ b/src/widgets/Header/model/types/types.tsx @@ -1,6 +1,5 @@ interface Logo { image: string - url: string title: string } From cedc5906bce7b43efb96629f0d92765416590dd2 Mon Sep 17 00:00:00 2001 From: Alexander Morugin Date: Thu, 18 Apr 2024 14:55:46 +0300 Subject: [PATCH 2/2] enhancement_307_fix_routing_at_header_icon --- src/shared/ui/logo/Logo.tsx | 6 ++---- src/widgets/Footer/Footer.tsx | 7 +------ src/widgets/Header/Header.tsx | 7 +------ src/widgets/Header/model/slice/headerSlice.tsx | 3 +-- src/widgets/Header/model/types/types.tsx | 1 - 5 files changed, 5 insertions(+), 19 deletions(-) diff --git a/src/shared/ui/logo/Logo.tsx b/src/shared/ui/logo/Logo.tsx index 058de6f5..11900fa6 100644 --- a/src/shared/ui/logo/Logo.tsx +++ b/src/shared/ui/logo/Logo.tsx @@ -7,22 +7,20 @@ import styles from './logo.module.scss' type TLogoProps = { image: string - title: string width: string height: string } /** * @param {string} image - путь к логотипу на сервере - * @param {string} title - лейбл логотипа (и альт) * @param {string} width - ширина логотипа * @param {string} height - высота логотипа */ -const Logo: FC = ({ image, title, width, height }) => { +const Logo: FC = ({ image, width, height }) => { return (
- {title} + Logo
) diff --git a/src/widgets/Footer/Footer.tsx b/src/widgets/Footer/Footer.tsx index dc6fd70e..43e1d3a8 100644 --- a/src/widgets/Footer/Footer.tsx +++ b/src/widgets/Footer/Footer.tsx @@ -45,12 +45,7 @@ function Footer() {
- + {coreBaseData.footer.company_info}
diff --git a/src/widgets/Header/Header.tsx b/src/widgets/Header/Header.tsx index a4d1306c..c6984bb7 100644 --- a/src/widgets/Header/Header.tsx +++ b/src/widgets/Header/Header.tsx @@ -147,12 +147,7 @@ function Header() {
- +
diff --git a/src/widgets/Header/model/slice/headerSlice.tsx b/src/widgets/Header/model/slice/headerSlice.tsx index f6ed1465..c627969f 100644 --- a/src/widgets/Header/model/slice/headerSlice.tsx +++ b/src/widgets/Header/model/slice/headerSlice.tsx @@ -9,8 +9,7 @@ const initialState: CoreBaseHeaderSchema = { isLoading: false, header: { main_logo: { - image: '', - title: '' + image: '' }, support: { callback: '', diff --git a/src/widgets/Header/model/types/types.tsx b/src/widgets/Header/model/types/types.tsx index fc8a4142..7e51401f 100644 --- a/src/widgets/Header/model/types/types.tsx +++ b/src/widgets/Header/model/types/types.tsx @@ -1,6 +1,5 @@ interface Logo { image: string - title: string } interface Support {