refactor: no need for else if true condition returns somrthing
This commit is contained in:
3505
package-lock.json
generated
3505
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -9,10 +9,10 @@ export default function Home(props) {
|
||||
|
||||
if (loading) {
|
||||
return <p className="text-gray-400">Loading...</p>;
|
||||
} else {
|
||||
if (!session) {
|
||||
window.location.href = "/auth/login";
|
||||
}
|
||||
}
|
||||
if (!session) {
|
||||
window.location.href = "/auth/login";
|
||||
return;
|
||||
}
|
||||
|
||||
return(
|
||||
|
||||
Reference in New Issue
Block a user