Skip to content
Snippets Groups Projects
Commit 5f6f0356 authored by Stephanie Briere Americo's avatar Stephanie Briere Americo
Browse files

Merge branch 'issue/36-Redirect' into 'development'

Issue #36: FIX redirect user to an empty page

See merge request !42
parents fbef2daa fbddd602
No related branches found
No related tags found
3 merge requests!58Version 1.1,!54Issue #53: Fix password info,!42Issue #36: FIX redirect user to an empty page
......@@ -76,8 +76,12 @@ function CardForm(props) {
const handleAnswer = () => {
//redirecionar para /answer/props.id
let path = `/form/${props.id}`;
history.push(path);
if (props.numberOfAnswers) {
let path = `/form/${props.id}`;
history.push(path);
} else {
alert("Não há respostas nesse form.");
}
};
const handleVisualize = () => {
......
......@@ -123,6 +123,7 @@ function GetForm() {
.then(function(res) {
if (!res.data.length) {
alert("Não há respostas!");
setToLogin(true);
return;
}
setFormArray(res.data);
......
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