Styling of home
This commit is contained in:
25
components/shared/ButtonVisualize/ButtonVisualize.tsx
Normal file
25
components/shared/ButtonVisualize/ButtonVisualize.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
import { FC } from 'react'
|
||||
import { I18n } from '../I18n/I18n'
|
||||
import { GraphIcon } from '../../icons/GraphIcon'
|
||||
import Link from 'next/link'
|
||||
import { useRouter } from 'next/router'
|
||||
import styles from './ButtonVisualize.module.css'
|
||||
|
||||
interface Props {
|
||||
groupId?: string
|
||||
large?: true
|
||||
}
|
||||
|
||||
export const ButtonVisualize: FC<Props> = ({ groupId, large }) => {
|
||||
const { query } = useRouter()
|
||||
return (
|
||||
<span className={styles.root}>
|
||||
<Link href={{ pathname: !groupId ? '/visualize' : `/visualize/${groupId}`, query }}>
|
||||
<a className={styles.link}>
|
||||
{large ? <I18n id={'page.home.pref.visualize'} /> : null}
|
||||
<GraphIcon />
|
||||
</a>
|
||||
</Link>
|
||||
</span>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user