Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making website logo clickable. #123

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions client/src/components/logo/logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,19 @@ interface Props {
variant?: 'primary' | 'secondary'
}

const Logo: FC<Props> = ({ onClick, variant }) => {
const Logo: FC<Props> = ({ variant }) => {
return (
<Box onClick={onClick}>
<Box>
<a href="https://www.bigohhh.com/" style={{ textDecoration: 'none' }}>
<Typography
variant="h4"
component="h1"
sx={{ fontWeight: 700, '& span': { color: variant === 'primary' ? 'primary.main' : 'unset' } }}
>
>
Big<span>Ohhh</span>
</Typography>
</Typography>
</a>

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove this space

Copy link
Author

@Narendra9906 Narendra9906 May 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logo tsx Okay, @omrajsharma. Could you also tell me how to fix this? I added an tag (i.e., anchor element) inside the element. I set the path of the tag to https://www.bigohhh.com/. Could you please guide me? This is my first time contributing. I am newbies.

I removed the space. Please check it. If it’s okay, then I will have to send you another pull request.
import React, { FC } from 'react'
import { Box, Typography } from '@mui/material'

interface Props {
onClick?: () => void
variant?: 'primary' | 'secondary'
}

const Logo: FC = ({ variant }) => {
return (

<a href="https://www.bigohhh.com/" style={{ textDecoration: 'none' }}>
<Typography
variant="h4"
component="h1"
sx={{ fontWeight: 700, '& span': { color: variant === 'primary' ? 'primary.main' : 'unset' } }}
>
BigOhhh



)
}
Logo.defaultProps = {
variant: 'primary',
}
export default Logo

</Box>
)
}
Expand Down