Commit 9f50519b authored by minseok.park's avatar minseok.park

add /docs link

parent 49d9fae6
// @ts-nocheck // @ts-nocheck
import { useCallback } from 'react'
import { SiGithub } from 'react-icons/si' import { SiGithub } from 'react-icons/si'
import styled from 'styled-components' import styled from 'styled-components'
import Button from './Button' import Button from './Button'
...@@ -10,6 +11,10 @@ const backdropStyle = { ...@@ -10,6 +11,10 @@ const backdropStyle = {
} }
export default function Banner () { export default function Banner () {
const onMoveDocPage = useCallback(() => {
window.location.href = 'https://swlab.bwg.co.kr/docs'
}, [])
return ( return (
<Wrapper> <Wrapper>
<Backdrop style={backdropStyle} /> <Backdrop style={backdropStyle} />
...@@ -18,7 +23,7 @@ export default function Banner () { ...@@ -18,7 +23,7 @@ export default function Banner () {
<BannerTitle type='sub' fontSize='3.5em'>Software Lab.</BannerTitle> <BannerTitle type='sub' fontSize='3.5em'>Software Lab.</BannerTitle>
<BannerDesc>Analyzing new technologies and ideas • Developing innovative products and services</BannerDesc> <BannerDesc>Analyzing new technologies and ideas • Developing innovative products and services</BannerDesc>
<ButtonGroup> <ButtonGroup>
<Button text='Documetation' /> <Button onClick={onMoveDocPage} text='Documetation' />
<Button text='GitHub' icon={<SiGithub />}/> <Button text='GitHub' icon={<SiGithub />}/>
</ButtonGroup> </ButtonGroup>
</Overlay> </Overlay>
......
// @ts-nocheck // @ts-nocheck
import { useCallback } from 'react'
import styled from 'styled-components' import styled from 'styled-components'
export default function Button (props) { export default function Button (props) {
const { icon, text } = props const { icon, text, onClick } = props
return <Wrapper>
const clickButton = useCallback(() => {
onClick && onClick()
}, [])
return <Wrapper onClick={clickButton}>
{text} {text}
<span>{ icon }</span> <span>{ icon }</span>
</Wrapper> </Wrapper>
......
// @ts-nocheck // @ts-nocheck
import { useCallback } from 'react'
import styled from 'styled-components' import styled from 'styled-components'
import Backdrop from './Backdrop' import Backdrop from './Backdrop'
import Button from './Button' import Button from './Button'
...@@ -6,6 +7,10 @@ import Button from './Button' ...@@ -6,6 +7,10 @@ import Button from './Button'
export default function Card (props) { export default function Card (props) {
const { title, subTitle, mainDesc, subDesc } = props const { title, subTitle, mainDesc, subDesc } = props
const onMovePage = useCallback((product) => () => {
window.location.href = `https://swlab.bwg.co.kr/docs/${product}`
}, [])
return <Scene> return <Scene>
<FlipCard> <FlipCard>
<CardFace className='front'> <CardFace className='front'>
...@@ -25,7 +30,7 @@ export default function Card (props) { ...@@ -25,7 +30,7 @@ export default function Card (props) {
</Title>) </Title>)
} }
</div> </div>
<Button text='Learn more'/> <Button onClick={onMovePage(title.toLowerCase())} text='Learn more'/>
</Overlay> </Overlay>
</CardFace> </CardFace>
</FlipCard> </FlipCard>
......
// @ts-nocheck // @ts-nocheck
import { useCallback } from 'react'
import styled, { keyframes } from 'styled-components' import styled, { keyframes } from 'styled-components'
export default function Nav () { export default function Nav () {
const onMoveDocPage = useCallback(() => {
window.location.href = 'https://swlab.bwg.co.kr/docs'
}, [])
return (<Menu> return (<Menu>
<MenuItem><p>Blog</p></MenuItem> <MenuItem><p>Blog</p></MenuItem>
<MenuItem><p>Documentation</p></MenuItem> <MenuItem onClick={onMoveDocPage}><p>Documentation</p></MenuItem>
</Menu>) </Menu>)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment