Clean up, reimplement native paper, and sign in screen.
This commit is contained in:
@@ -1,5 +1,17 @@
|
||||
import { selectCurrentUser } from "@/redux/user/user.selectors";
|
||||
import { Redirect } from "expo-router";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
|
||||
export default function Index() {
|
||||
return <Redirect href={`/jobs`} />;
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
currentUser: selectCurrentUser,
|
||||
});
|
||||
|
||||
function Index({ currentUser }) {
|
||||
if (currentUser.authorized) {
|
||||
return <Redirect href="/" />;
|
||||
}
|
||||
|
||||
return <Redirect href="/sign-in" />;
|
||||
}
|
||||
export default connect(mapStateToProps, null)(Index);
|
||||
|
||||
Reference in New Issue
Block a user