Skip to content

Commit

Permalink
log in fix???
Browse files Browse the repository at this point in the history
  • Loading branch information
Aryan-Bahl committed Sep 13, 2024
1 parent 2bc9e47 commit 51fee0d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const App = (props) => {
type: "error",
text1: "No user found!",
text2: "Please register on the R|P website!",
topOffset: 30,
topOffset: 50,
});
setDeepLinkHandled(false);
} else {
Expand Down
6 changes: 5 additions & 1 deletion screens/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { useState } from "react";
import ScreenImage from "../assets/SVGs/login/LoginScreen.svg";

const authUrl = "https://api.reflectionsprojections.org/auth/login/mobile/";
const redirectURL = "reflectionsprojections://Main";
const redirectURL = "reflectionsprojections://--/Main";

interface LoginProps {
navigation: NavigationProp<ParamListBase>;
Expand All @@ -32,7 +32,10 @@ const Login: React.FC<LoginProps> = ({ navigation }) => {

useEffect(() => {
if (token && roles.includes('USER')) {
console.log("logging in again")
setLoggedIn(true);
} else {
setLoggedIn(false);
}
}, [token, roles, navigation]);

Expand All @@ -47,6 +50,7 @@ const Login: React.FC<LoginProps> = ({ navigation }) => {
.then((result) => {
if (result.type === "success") {
Linking.openURL(result.url);
navigation.navigate("Main");
}
})
.catch((err) => {
Expand Down

0 comments on commit 51fee0d

Please sign in to comment.