Skip to content

Commit

Permalink
fix(logo): render Icon and Title
Browse files Browse the repository at this point in the history
  • Loading branch information
Shoaibdev7 committed Nov 21, 2024
1 parent 30b5ae1 commit 64c7b02
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 55 deletions.
12 changes: 0 additions & 12 deletions public/svg-icons/Logo.svg

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
/* eslint-disable */
import React from 'react';
import React from 'react'

const Logo: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (
<svg
width="1em"
height="1em"
viewBox="0 0 30 28"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
>
export const Logo: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (
<svg width="1em" height="1em" viewBox="0 0 30 28" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<path
d="M7.2998 2.55199C7.2998 1.51094 8.11675 0.666992 9.1245 0.666992H12.1299C13.1376 0.666992 13.9546 1.51094 13.9546 2.55199C13.9546 3.59305 13.1376 4.43699 12.1299 4.43699H9.1245C8.11675 4.43699 7.2998 3.59305 7.2998 2.55199Z"
fill="currentColor"
Expand Down Expand Up @@ -50,6 +44,6 @@ const Logo: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (
fill="currentColor"
/>
</svg>
);
)

export default Logo;
export default Logo
44 changes: 12 additions & 32 deletions src/modules/mindset/components/header/index.tsx
Original file line number Diff line number Diff line change
@@ -1,39 +1,19 @@
import { useEffect, useState } from 'react'
import styled from 'styled-components'
import { Flex } from '~/components/common/Flex'
import { Text } from '~/components/common/Text'
import Logo from '~/components/Icons/Logo'
import { getAboutData } from '~/network/fetchSourcesData'
import { colors } from '~/utils/colors'

export const Header = () => {
const [title, setTitle] = useState<string>('')

useEffect(() => {
const fetchTitle = async () => {
try {
const response = await getAboutData()

setTitle(response.title || 'Graph Mindset')
} catch (error) {
console.error('Failed to fetch title:', error)
}
}

fetchTitle()
}, [])

return (
<Head>
<LogoButton>
<IconWrapper>
<Logo />
</IconWrapper>
</LogoButton>
<StyledText>{title}</StyledText>
</Head>
)
}
import { Logo } from './Icon/Logo'

export const Header = () => (
<Head>
<LogoButton>
<IconWrapper>
<Logo />
</IconWrapper>
</LogoButton>
<StyledText>Graph Mindset</StyledText>
</Head>
)

const Head = styled(Flex).attrs({
align: 'center',
Expand Down

0 comments on commit 64c7b02

Please sign in to comment.