Format all files with prettier config for baseline

This commit is contained in:
Alex Holliday committed 2024-10-17 12:05:06 +08:00
1 parent d8e2b06eca
commit 15ab9f8bc8
132 files changed
+24210 -23747

No files matched your search

+10 -7
View File
@@ -14,17 +14,20 @@ import PropTypes from "prop-types";
*/
const ProtectedRoute = ({ Component, ...rest }) => {
const authState = useSelector((state) => state.auth);
const authState = useSelector((state) => state.auth);
return authState.authToken ? (
<Component {...rest} />
) : (
<Navigate to="/login" replace />
);
return authState.authToken ? (
<Component {...rest} />
) : (
<Navigate
to="/login"
replace
/>
);
};
ProtectedRoute.propTypes = {
Component: PropTypes.elementType.isRequired,
Component: PropTypes.elementType.isRequired,
};
export default ProtectedRoute;