ref(frontend): fix file or disable eslint rules

This commit is contained in:
이강준
2022-11-26 18:20:02 +09:00
parent f2329884f8
commit 568042fac0
19 changed files with 186 additions and 120 deletions
+6 -2
View File
@@ -10,11 +10,14 @@ export default function DashboardRedirect() {
/**
* Here we forward to the default workspace if a user opens this url
*/
// eslint-disable-next-line react-hooks/exhaustive-deps
useEffect(async () => {
let userWorkspace;
try {
if (localStorage.getItem("projectData.id")) {
router.push("/dashboard/" + localStorage.getItem("projectData.id"));
router.push(
"/dashboard/" + localStorage.getItem("projectData.id")
);
} else {
const userWorkspaces = await getWorkspaces();
userWorkspace = userWorkspaces[0]._id;
@@ -23,9 +26,10 @@ export default function DashboardRedirect() {
} catch (error) {
console.log("Error - Not logged in yet");
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
return <div></div>
return <div></div>;
}
DashboardRedirect.requireAuth = true;