added account status check

This commit is contained in:
mmacierzanka committed 2021-10-07 23:11:15 +02:00
1 parent a524fc0bac
commit 2713c5fa31
2 files changed
+10 -1

No files matched your search

+3
View File
@@ -13,6 +13,9 @@ import { getPlace } from "../../utils/map/getPlace";
import { MapPopup } from "./MapPopup";
export const CreateEvent = () => {
if (LOGIN_MANAGER.state === null) {
history.push("/");
}
useTitle("Tworzenie wydarzenia");
const history = useHistory();
const [locationText, setLocationText] = useState("Brak lokalizacji");
+7 -1
View File
@@ -5,7 +5,13 @@ import { API_CLIENT } from "../../constants";
import { container } from "../../global.module.scss";
import { EventPreviewEdit } from "../../components/EventPreviewEdit";
import { useHistory } from "react-router-dom";
import { LOGIN_MANAGER } from "../../constants";
import { useHistory } from "react-router";
export const Dashboard = () => {
if (LOGIN_MANAGER.state === null) {
history.push("/");
}
const [list, updateList] = useState();
let array = [];
const history = useHistory();
@@ -21,7 +27,7 @@ export const Dashboard = () => {
render();
}
});
}else{
} else {
history.push("/");
}
});