Skip to content
Snippets Groups Projects
Commit b6088c6a authored by Seren Siahaan's avatar Seren Siahaan
Browse files

open login page for unauthorized user

parent edcf4407
Branches
Tags
1 merge request!17merge branch 'seren' into 'main'
......@@ -64,6 +64,11 @@ export default function InformasiPerusahaan({ propertyWebsite }) {
}
useEffect(() => {
const token = window.localStorage.getItem("token")
if (token === undefined || token === null) {
window.location.replace("/auth/login")
return
}
fetch("https://rpl-backend-production.up.railway.app/v1/property").then(async (response) => {
const responsejson = await response.json()
setDeskripsi(responsejson.data.description)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment