mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2025-11-02 20:23:32 +08:00
refactoring (page): standalone page
This commit is contained in:
@ -10,10 +10,10 @@ export function HomePage() {
|
||||
useEffect(() => {
|
||||
Session.currentUser().then((res) => {
|
||||
if (res && res.is_authenticated === true) {
|
||||
setRedirection(res.home ? "/files" + res.home : "/files");
|
||||
} else {
|
||||
setRedirection("/login");
|
||||
setRedirection(res.home ? `/files${res.home}` : "/files");
|
||||
return;
|
||||
}
|
||||
setRedirection("/login");
|
||||
}).catch((err) => setRedirection("/login"));
|
||||
}, []);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user