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

began work on UploadPage

parent 9515d053
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...,!24Tela recurso
/*Copyright (C) 2019 Centro de Computacao Cientifica e Software Livre
Departamento de Informatica - Universidade Federal do Parana
This file is part of Plataforma Integrada MEC.
Plataforma Integrada MEC is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Plataforma Integrada MEC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with Plataforma Integrada MEC. If not, see <http://www.gnu.org/licenses/>.*/
import React, {useState} from 'react'
import styled from 'styled-components'
import Grid from '@material-ui/core/Grid';
import UploadFileWrapper from '../Components/UploadPageComponents/UploadFileWrapper.js'
import LearnObjInfo from '../Components/UploadPageComponents/LearnObjInfo.js'
import Alert from '../Components/Alert.js';
import Snackbar from '@material-ui/core/Snackbar';
export default function UploadPage (props) {
const [object, setObject] = useState()
const [userPickedObject, togglePickedObject] = useState(false)
const handleChooseObject = (obj) => {
setObject(obj)
togglePickedObject(true)
toggleSnackbar(true)
}
const [snackbarOpen, toggleSnackbar] = useState(false)
return (
<React.Fragment>
<Snackbar open={snackbarOpen} autoHideDuration={1000} onClose={() => {toggleSnackbar(false)}}
anchorOrigin = {{ vertical:'top', horizontal:'right' }}
>
<Alert severity="info" style={{backgroundColor:"#00acc1"}}>
Link salvo com sucesso!
</Alert>
</Snackbar>
<Background>
<div className="container">
<Grid container spacing={2}>
<Grid item md={4} xs={12}>
<UploadFileWrapper submit={handleChooseObject}/>
</Grid>
<Grid item md={8} xs={12}>
<LearnObjInfo/>
</Grid>
</Grid>
</div>
</Background>
</React.Fragment>
)
}
const Background = styled.div`
padding-top : 40px;
background-color : #f4f4f4;
color : #666;
.container {
padding : 0;
margin-right : auto;
margin-left : auto;
@media screen and (min-width: 768px) {
width : 750px;
}
@media screen and (min-width: 992px) {
width : 970px;
}
@media screen and (min-width: 1200px) {
width : 1170px;
}
}
`
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