diff --git a/pages/infoperusahaan/index.jsx b/pages/infoperusahaan/index.jsx index 2c53b67e4801535f1d95c88930deada220261feb..97351f631bc03b9393601132f102d0c0cb2e5172 100644 --- a/pages/infoperusahaan/index.jsx +++ b/pages/infoperusahaan/index.jsx @@ -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)