rome -> eslint + prettier
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
import { useAccount } from "@utils/hooks/useAccount";
|
||||
import { ReactNode } from "react";
|
||||
import { Navigate } from "react-router-dom";
|
||||
import { ReactNode } from 'react';
|
||||
import { Navigate } from 'react-router-dom';
|
||||
|
||||
import { useAccount } from '@utils/hooks/useAccount';
|
||||
|
||||
export function Protected({ children }: { children: ReactNode }) {
|
||||
const { status, account } = useAccount();
|
||||
const { status, account } = useAccount();
|
||||
|
||||
if (status === "success" && !account) {
|
||||
return <Navigate to="/auth/welcome" replace />;
|
||||
}
|
||||
if (status === 'success' && !account) {
|
||||
return <Navigate to="/auth/welcome" replace />;
|
||||
}
|
||||
|
||||
return children;
|
||||
return children;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user