|
@@ -9,7 +9,7 @@ const WatchButton = (props) => {
|
|
|
const [isWatching, setIsWatching] = useState(true);
|
|
const [isWatching, setIsWatching] = useState(true);
|
|
|
|
|
|
|
|
const handleClick = () => {
|
|
const handleClick = () => {
|
|
|
- console.log('watch button clicked!');
|
|
|
|
|
|
|
+ setIsWatching(!isWatching);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
@@ -18,7 +18,7 @@ const WatchButton = (props) => {
|
|
|
type="button"
|
|
type="button"
|
|
|
id="bookmark-button"
|
|
id="bookmark-button"
|
|
|
onClick={handleClick}
|
|
onClick={handleClick}
|
|
|
- className={`btn btn-bookmark border-0 ${`btn-${props.size}`}`}
|
|
|
|
|
|
|
+ className={`btn btn-bookmark border-0 ${`btn-${props.size}`} ${isWatching ? 'active' : ''}`}
|
|
|
>
|
|
>
|
|
|
{isWatching && (
|
|
{isWatching && (
|
|
|
<i className="fa fa-eye"></i>
|
|
<i className="fa fa-eye"></i>
|