Skip to content
Snippets Groups Projects
Commit c508d0ec authored by Lucas Eduardo Schoenfelder's avatar Lucas Eduardo Schoenfelder
Browse files

fixed links not working outside of homepage

parent ec1a440b
No related branches found
No related tags found
3 merge requests!57Merge of develop into master,!56Fixed buttons reportar, seguir, compartilhar, guardar and entrar (in comments...,!39Update admin system
...@@ -22,6 +22,7 @@ import styled from 'styled-components' ...@@ -22,6 +22,7 @@ import styled from 'styled-components'
import Grid from '@material-ui/core/Grid'; import Grid from '@material-ui/core/Grid';
import {Link} from 'react-router-dom' import {Link} from 'react-router-dom'
import {NoIcon} from '../ContactButtons/FollowButton.js' import {NoIcon} from '../ContactButtons/FollowButton.js'
import {NoIconFollowing} from '../ContactButtons/FollowingButton.js'
import Collapse from '@material-ui/core/Collapse'; import Collapse from '@material-ui/core/Collapse';
import SdCardIcon from '@material-ui/icons/SdCard'; import SdCardIcon from '@material-ui/icons/SdCard';
import TranslateIcon from '@material-ui/icons/Translate'; import TranslateIcon from '@material-ui/icons/Translate';
...@@ -136,6 +137,9 @@ export default function Sobre (props) { ...@@ -136,6 +137,9 @@ export default function Sobre (props) {
let windowWidth = window.innerWidth let windowWidth = window.innerWidth
const [followed, setFollowed] = useState(props.followed)
const toggleFollowed = () => {setFollowed(!followed)}
return ( return (
<Grid container style={{paddingRight : "15px", paddingLeft : "15px"}}> <Grid container style={{paddingRight : "15px", paddingLeft : "15px"}}>
...@@ -198,10 +202,19 @@ export default function Sobre (props) { ...@@ -198,10 +202,19 @@ export default function Sobre (props) {
<div style={{paddingTop : "0.75em", display : "flex", justifyContent : "center"}}> <div style={{paddingTop : "0.75em", display : "flex", justifyContent : "center"}}>
{ {
(props.id !== state.currentUser.id) && (props.id !== state.currentUser.id) &&
followed ? (
<>
<NoIconFollowing followableID={props.id} toggleFollowed={toggleFollowed}/>
<ContactCardOptions followableID={props.id}/>
</>
)
:
(
<> <>
<NoIcon followableID={props.id}/> <NoIcon followableID={props.id} toggleFollowed={toggleFollowed}/>
<ContactCardOptions followableID={props.id}/> <ContactCardOptions followableID={props.id}/>
</> </>
)
} }
</div> </div>
</MetasObjeto> </MetasObjeto>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment