Skip to content

Commit

Permalink
[#60] 로그 유무상태에 따른 comment 적는 부분 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
hoyyChoi committed Sep 15, 2022
1 parent 105e08f commit e15e0ab
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/component/Article/ArticleContainer.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
import React from 'react'
import { useRecoilValue } from 'recoil'
import { authState } from '../../atoms/auth'
import ArticleContents from './ArticleContents'
import ShowComment from './ShowComment'
import WriteCommet from './WriteCommet'
import { Link } from 'react-router-dom'

const ArticleContainer = ({data}) => {

const auth = useRecoilValue(authState)
return (
<div className="container page">

<ArticleContents data={data}/>
<WriteCommet />
{auth?<WriteCommet />:<div style={{textAlign:'center', margin:'10px'}}>
<Link to="/login">sign in</Link> or <Link to="/register">sign up</Link>
</div>}
<ShowComment />

</div>
Expand Down

0 comments on commit e15e0ab

Please sign in to comment.