Skip to content

Commit

Permalink
refactor: cleaning issues
Browse files Browse the repository at this point in the history
  • Loading branch information
iuricmp committed Oct 9, 2024
1 parent b3fe51a commit e69c823
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 1 addition & 4 deletions mobile/app/home/feed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ export default function Page() {

useEffect(() => {
const unsubscribe = navigation.addListener("focus", async () => {
if (!account) {
RNAlert.alert("No user found.");
return;
}
if (!account) return;
setError(undefined);
setIsLoading(true);
try {
Expand Down
8 changes: 7 additions & 1 deletion mobile/app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Button from "@gno/components/button";
import Layout from "@gno/components/layout";
import Ruller from "@gno/components/row/Ruller";
import Text from "@gno/components/text";
import { clearLinking, loggedIn, requestLoginForGnokeyMobile, selectPath, selectQueryParamsAddress, useAppDispatch, useAppSelector } from "@gno/redux";
import { clearLinking, loggedIn, requestLoginForGnokeyMobile, selectAccount, selectPath, selectQueryParamsAddress, useAppDispatch, useAppSelector } from "@gno/redux";
import Spacer from "@gno/components/spacer";
import * as Application from "expo-application";
import { useEffect } from "react";
Expand All @@ -14,9 +14,15 @@ export default function Root() {
const route = useRouter();
const path = useAppSelector(selectPath)
const bech32 = useAppSelector(selectQueryParamsAddress)
const account = useAppSelector(selectAccount)

const appVersion = Application.nativeApplicationVersion;

useEffect(() => {
if (account) {
route.replace("/home");
}
}, [account]);

useEffect(() => {
if (path === "login-callback" && bech32) {
Expand Down

0 comments on commit e69c823

Please sign in to comment.