-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix issue #3 : Create StreamDescriptionOverlay component #16
Conversation
…lay-Component.tsx
const [myIcon, setmyIcon] = following? useState("bell-slash") : useState("bell"); | ||
const [buttonColor, setbuttonColor] = following? useState("#1762e3") : useState("#ff0000"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of defining these states directly use this condition inside Icon.Button like this.
name={following ? "bell-slash" : "bell"}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made suggested changes.
const [following,changefollowing]=useState(props.isFollowed); | ||
const [myIcon, setmyIcon] = following? useState("bell-slash") : useState("bell"); | ||
const [buttonColor, setbuttonColor] = following? useState("#1762e3") : useState("#ff0000"); | ||
function changeit(){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use arrow functions instead of normal one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made suggested changes.
const toggleOverlay = () => { | ||
setVisible(!visible); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't write separate function for this directly use this like onBackDropPress{()=>setVisible(false)}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made suggested changes.
Created StreamDescriptionOverlay component.
Resolves #3