Skip to content

Commit

Permalink
Changed readme and added some features for demo
Browse files Browse the repository at this point in the history
  • Loading branch information
49513 - Diogo Rodrigues committed Jun 7, 2024
1 parent 3b4ae8f commit 075d33b
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 19 deletions.
15 changes: 15 additions & 0 deletions .expo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
> Why do I have a folder named ".expo" in my project?
The ".expo" folder is created when an Expo project is started using "expo start" command.

> What do the files contain?
- "devices.json": contains information about devices that have recently opened this project. This is used to populate the "Development sessions" list in your development builds.
- "packager-info.json": contains port numbers and process PIDs that are used to serve the application to the mobile device/simulator.
- "settings.json": contains the server configuration that is used to serve the application manifest.

> Should I commit the ".expo" folder?
No, you should not share the ".expo" folder. It does not contain any information that is relevant for other developers working on the project, it is specific to your machine.

Upon project creation, the ".expo" folder is already added to your ".gitignore" file.
8 changes: 8 additions & 0 deletions .expo/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"hostType": "lan",
"lanType": "ip",
"dev": true,
"minify": false,
"urlRandomness": null,
"https": false
}
25 changes: 12 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,18 @@ SCAR, **S**mart **C**ontract **A**cademic **R**egistry is a multiplatform applic
- [![Node][Node.js]][Node-url]
- [![React Native][ReactNative.js]][ReactNative-url]
- [![Expo React Native][Expo.js]][Expo-url]
- [![FireBase][FireBase.js]][FireBase-url]
- [![Smart Contract][Solidity.sol]][Solidity-url]
- [![Hardhat][Hardhat.js]][Hardhat-url]
- [![Ethereum][Ethereum.js]][Ethereum-url]
- [![TypeScript][TypeScript.ts]][TypeScript-url]

<p align="right">(<a href="#readme-top">back to top</a>)</p>

<!-- GETTING STARTED -->

## Getting Started

This is an example of how you may give instructions on setting up your project locally.
To get a local copy up and running follow these simple example steps.
We need to install the DiGo Certify app on your device.
The following instructions will guide you through the installation process.

### Prerequisites

Expand All @@ -100,28 +98,29 @@ This is an example of how to list things you need to use the software and how to
1. Get a free API Key at [https://example.com](https://example.com)
2. Clone the repo
```sh
git clone https://github.com/github_username/repo_name.git
git clone https://github.com/DiGo-Certify/DiGo-certify-app.git
```
3. Install NPM packages
```sh
cd code
npm install
```
4. Enter your API in `config.js`
```js
const API_KEY = "ENTER YOUR API";
```
4. Run the app
```sh
npx expo start
```

<p align="right">(<a href="#readme-top">back to top</a>)</p>

<!-- USAGE EXAMPLES -->

## Usage
<!-- ## Usage

Use this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources.

_For more examples, please refer to the [Documentation](https://example.com)_

<p align="right">(<a href="#readme-top">back to top</a>)</p>
<p align="right">(<a href="#readme-top">back to top</a>)</p> -->

<!-- LICENSE -->

Expand All @@ -147,11 +146,11 @@ Distributed under the GNU GENERAL PUBLIC LICENSE License. See `LICENSE.txt` for

<!-- ACKNOWLEDGMENTS -->

## Acknowledgments
<!-- ## Acknowledgments

- []()
- []()
- []()
- []() -->

<p align="right">(<a href="#readme-top">back to top</a>)</p>

Expand Down
2 changes: 1 addition & 1 deletion code/app/(auth)/sign-in.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const SignIn = () => {
// setUser(result);
// setIsLogged(true);

router.push('/profile');
router.replace('/profile');
} catch (error) {
Alert.alert('Error', error.message);
} finally {
Expand Down
2 changes: 1 addition & 1 deletion code/app/(auth)/sign-up.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function SignUp() {
// setUser(result);
// setIsLogged(true);

router.push('/profile');
router.replace('/profile');
} catch (error) {
Alert.alert('Error', error.message);
} finally {
Expand Down
11 changes: 9 additions & 2 deletions code/app/(tabs)/profile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Images from '@/constants/images';
import { SafeAreaView } from 'react-native-safe-area-context';
import Colors from '@/constants/colors';
import { List } from 'react-native-paper';
import { router } from 'expo-router';

const Profile = () => {
// Mockup profile
Expand All @@ -18,7 +19,13 @@ const Profile = () => {

// Handle wallet connect with metamask
const handleWalletConnect = async () => {
console.log('Wallet connect');
router.push('/initial-screen/initial-screen')

};

// Handle logout
const handleLogout = () => {
router.push('/sign-in');
};

return (
Expand All @@ -39,7 +46,7 @@ const Profile = () => {
icon={Icons.send}
/>
<ListItem title="Settings" onPress={() => console.log('Settings')} icon={Icons.settings} />
<ListItem title="Log out" onPress={() => console.log('Log out')} icon={Icons.logOut} />
<ListItem title="Log out" onPress={handleLogout} icon={Icons.logOut} />
</View>
</SafeAreaView>
);
Expand Down
1 change: 1 addition & 0 deletions code/app/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React, { useState, useEffect } from 'react';
import * as SecureStore from 'expo-secure-store';
import SignIn from './(auth)/sign-in';
import Profile from './(tabs)/profile';
import InitialScreen from './initial-screen/initial-screen';

// A possibility of the decision to decide what the first screen should be
function App() {
Expand Down
2 changes: 1 addition & 1 deletion code/app/initial-screen/initial-screen.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function InitialScreen() {
>
<Text style={styles.buttonText}>Create Wallet</Text>
</TouchableOpacity>
<Text style={styles.bottomText} onPress={() => router.replace('/sign-in')}>
<Text style={styles.bottomText} onPress={() => router.replace('/profile')}>
Already have a wallet
</Text>
</View>
Expand Down
2 changes: 1 addition & 1 deletion code/constants/Colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ export default {
black,
white,
grey,
sonicSilver
sonicSilver,
};

0 comments on commit 075d33b

Please sign in to comment.