Skip to content
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

Merged
merged 11 commits into from
Jul 12, 2021

Conversation

BipplavTiwari
Copy link
Contributor

@BipplavTiwari BipplavTiwari commented Jun 14, 2021

Created StreamDescriptionOverlay component.
Resolves #3

@BipplavTiwari BipplavTiwari changed the title Created StreamDescriptionOverlay component fix issue#3 : Create StreamDescriptionOverlay component Jun 14, 2021
@BipplavTiwari BipplavTiwari changed the title fix issue#3 : Create StreamDescriptionOverlay component fix issue #3 : Create StreamDescriptionOverlay component Jun 14, 2021
Comment on lines 42 to 43
const [myIcon, setmyIcon] = following? useState("bell-slash") : useState("bell");
const [buttonColor, setbuttonColor] = following? useState("#1762e3") : useState("#ff0000");
Copy link
Collaborator

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"}

Copy link
Contributor Author

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(){
Copy link
Collaborator

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made suggested changes.

Comment on lines 66 to 68
const toggleOverlay = () => {
setVisible(!visible);
};
Copy link
Collaborator

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)}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made suggested changes.

@kartikcode kartikcode merged commit 771a0b0 into pclubiitk:master Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create StreamDescriptionOverlay component
3 participants