Skip to content

Commit

Permalink
refactor: onboard feature goes to Gnokey
Browse files Browse the repository at this point in the history
  • Loading branch information
iuricmp committed Oct 9, 2024
1 parent e69c823 commit 9912b76
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 575 deletions.
18 changes: 0 additions & 18 deletions mobile/app/home/profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { AccountBalance } from "@gno/components/settings";
import Text from "@gno/components/text";
import { useSearch } from "@gno/hooks/use-search";
import { useNotificationContext } from "@gno/provider/notification-provider";
import { onboarding } from "redux/features/signupSlice";
import AvatarPicker from "@gno/components/avatar/avatar-picker";
import { ProgressViewModal } from "@gno/components/view/progress";

Expand Down Expand Up @@ -39,22 +38,6 @@ export default function Page() {
return unsubscribe;
}, [navigation]);

const onboard = async () => {
if (!account) {
console.log("No active account");
return;
}
setLoading(true);
try {
await dispatch(onboarding({ account })).unwrap();
fetchAccountData();
} catch (error) {
console.log("Error on onboard", JSON.stringify(error));
} finally {
setLoading(false);
}
};

const onPressNotification = async () => {
if (!account) {
throw new Error("No active account");
Expand Down Expand Up @@ -124,7 +107,6 @@ export default function Page() {
<Layout.Footer>
<ProgressViewModal visible={modalVisible} onRequestClose={() => setModalVisible(false)} />
<Button.TouchableOpacity title="Logs" onPress={() => setModalVisible(true)} variant="primary" />
<Button.TouchableOpacity title="Onboard the current user" onPress={onboard} variant="primary" />
<Button.TouchableOpacity
title="Register to the notification service"
onPress={onPressNotification}
Expand Down
224 changes: 0 additions & 224 deletions mobile/app/sign-up.tsx

This file was deleted.

9 changes: 4 additions & 5 deletions mobile/components/view/progress/modal.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import React from "react";
import { View, Modal, StyleSheet, FlatList, TouchableOpacity, Share } from "react-native";
import { useAppDispatch, useAppSelector } from "@gno/redux";
import { colors } from "@gno/styles/colors";
import Layout from "@gno/components/layout";
import { clearProgress, selectProgress } from "redux/features/signupSlice";
import Text from "@gno/components/text";
import { EvilIcons } from "@expo/vector-icons";

Expand All @@ -12,12 +10,13 @@ interface Props {
onRequestClose: () => void;
}

// TODO: reimplment this
const ProgressViewModal: React.FC<Props> = ({ visible, onRequestClose }) => {
const dispatch = useAppDispatch();
const progress = useAppSelector(selectProgress);
//const dispatch = useAppDispatch();
const progress = ["<disabled>"]

const clear = async () => {
await dispatch(clearProgress());
//await dispatch(clearProgress());
};

const share = async () => {
Expand Down
Loading

0 comments on commit 9912b76

Please sign in to comment.