-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
276 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { useState } from "react"; | ||
import PropTypes from "prop-types"; | ||
import "./styles/FilteredComment.scss"; | ||
|
||
const FilteredCommentContent = ({ content, clean = true }) => { | ||
const [isRevealed, setIsRevealed] = useState(false); | ||
|
||
if (clean) { | ||
return <div className="comment-content">{content}</div>; | ||
} | ||
|
||
return ( | ||
<div className="filtered-comment"> | ||
{!isRevealed ? ( | ||
<div className="filtered-message"> | ||
<span className="warning-text"> | ||
[구름봇에 의해 가려진 댓글입니다] | ||
</span> | ||
<button onClick={() => setIsRevealed(true)} className="reveal-button"> | ||
확인하기 | ||
</button> | ||
</div> | ||
) : ( | ||
<div className="comment-content">{content}</div> | ||
)} | ||
</div> | ||
); | ||
}; | ||
|
||
FilteredCommentContent.propTypes = { | ||
content: PropTypes.string.isRequired, | ||
clean: PropTypes.bool, | ||
}; | ||
|
||
export default FilteredCommentContent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { useState } from "react"; | ||
import PropTypes from "prop-types"; | ||
import "./styles/FilteredContent.scss"; | ||
|
||
const FilteredContent = ({ title, content, clean = true }) => { | ||
const [isRevealed, setIsRevealed] = useState(false); | ||
|
||
if (clean) { | ||
return ( | ||
<div className="content-wrapper"> | ||
<div className="title">{title}</div> | ||
<div className="content">{content}</div> | ||
</div> | ||
); | ||
} | ||
|
||
return ( | ||
<div className="filtered-content"> | ||
{!isRevealed ? ( | ||
<div className="filtered-message"> | ||
<span className="warning-text"> | ||
[구름봇에 의해 가려진 게시물입니다] | ||
</span> | ||
<button onClick={() => setIsRevealed(true)} className="reveal-button"> | ||
확인하기 | ||
</button> | ||
</div> | ||
) : ( | ||
<div className="revealed-content"> | ||
<div className="title">{title}</div> | ||
<div className="content">{content}</div> | ||
</div> | ||
)} | ||
</div> | ||
); | ||
}; | ||
|
||
FilteredContent.propTypes = { | ||
title: PropTypes.string.isRequired, | ||
content: PropTypes.string.isRequired, | ||
clean: PropTypes.bool, | ||
}; | ||
|
||
export default FilteredContent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import PropTypes from "prop-types"; | ||
|
||
const SimpleFilteredContent = ({ content, clean = true }) => { | ||
if (clean) { | ||
return <div>{content}</div>; | ||
} | ||
|
||
return ( | ||
<div className="simple-filtered-content"> | ||
<span className="warning-text">[구름봇에 의해 가려졌습니다]</span> | ||
</div> | ||
); | ||
}; | ||
|
||
SimpleFilteredContent.propTypes = { | ||
content: PropTypes.string.isRequired, | ||
clean: PropTypes.bool, | ||
}; | ||
|
||
export default SimpleFilteredContent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.