Skip to content
Snippets Groups Projects
Commit fbddd602 authored by Richard Fernando Heise Ferreira's avatar Richard Fernando Heise Ferreira Committed by Stephanie Briere Americo
Browse files

Issue #36: FIX redirect user to an empty page

parent fbef2daa
No related branches found
No related tags found
2 merge requests!58Version 1.1,!54Issue #53: Fix password info
......@@ -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