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

wip

parent 5642a03e
No related branches found
No related tags found
4 merge requests!57Merge of develop into master,!56Fixed buttons reportar, seguir, compartilhar, guardar and entrar (in comments...,!39Update admin system,!32Homologa
......@@ -59,24 +59,24 @@ export default function Notification (props) {
const [anchorEl, setAnchorEl] = React.useState(null);
const [notifications, setNotifications] = useState([]);
const [notificatonsLength, setLength] = useState(0);
useEffect(() => {
let config = getAxiosConfig()
axios.get(`${apiUrl}/feed?offset=0&limit=30`, config)
.then( (response) => {
if ( response.headers['access-token'] ) {
sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
}
console.log('atividades response: ', response)
setNotifications(response.data)
setLength(response.data.length)
},
(error) => {
console.log('error while running getNotifications')
}
)
}, [])
// useEffect(() => {
// let config = getAxiosConfig()
// axios.get(`${apiUrl}/feed?offset=0&limit=30`, config)
// .then( (response) => {
// if ( response.headers['access-token'] ) {
// sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
// }
//
// console.log('atividades response: ', response)
// setNotifications(response.data)
// setLength(response.data.length)
//
// },
// (error) => {
// console.log('error while running getNotifications')
// }
// )
// }, [])
function handleClick(event) {
setAnchorEl(event.currentTarget);
}
......@@ -126,7 +126,7 @@ export default function Notification (props) {
}
const StyledMenu = styled(Menu)`
`
const ContainerDiv = styled.div`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment