Skip to content

Commit

Permalink
enhancement_307_fix_routing_at_header_icon
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderMorugin committed Apr 17, 2024
1 parent d2b2831 commit 49b4ee4
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 8 deletions.
7 changes: 3 additions & 4 deletions src/shared/ui/logo/Logo.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
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'

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<TLogoProps> = ({ image, title, url, width, height }) => {
const Logo: FC<TLogoProps> = ({ image, title, width, height }) => {
return (
<div className={styles.container}>
<Link to={url} className={styles.link}>
<Link to={Routes.HOME} className={styles.link}>
<img src={image} title={title} alt={title} style={{ width, height }} />
</Link>
</div>
Expand Down
1 change: 0 additions & 1 deletion src/widgets/Footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ function Footer() {
<Logo
image={coreBaseData.footer.main_logo.image}
title={coreBaseData.footer.main_logo.title}
url={coreBaseData.footer.main_logo.url}
width="114px"
height="38px"
/>
Expand Down
1 change: 0 additions & 1 deletion src/widgets/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ function Header() {
<Logo
image={coreBaseData.header.main_logo.image}
title={coreBaseData.header.main_logo.title}
url={coreBaseData.header.main_logo.url}
width="138px"
height="46px"
/>
Expand Down
1 change: 0 additions & 1 deletion src/widgets/Header/model/slice/headerSlice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const initialState: CoreBaseHeaderSchema = {
header: {
main_logo: {
image: '',
url: '',
title: ''
},
support: {
Expand Down
1 change: 0 additions & 1 deletion src/widgets/Header/model/types/types.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
interface Logo {
image: string
url: string
title: string
}

Expand Down

0 comments on commit 49b4ee4

Please sign in to comment.