Skip to content

Created basic app navigation layout and added Login screen #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 359 commits into
base: v2-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
359 commits
Select commit Hold shift + click to select a range
981b7a1
Changed naming convention
kekoawong Aug 11, 2022
1ef59dc
Merge pull request #14 from maetio/dev
kekoawong Aug 11, 2022
a14e741
Changed all screen names due to github error
kekoawong Aug 11, 2022
e106836
Merge pull request #15 from maetio/dev
kekoawong Aug 11, 2022
cc8ae5b
Fixed Expo Go bug and updated documentation
kekoawong Aug 17, 2022
0a9bd43
Updated documentation
kekoawong Aug 17, 2022
5e9fc20
Updated image for expo template
kekoawong Aug 17, 2022
7bc767b
Merge pull request #17 from maetio/dev
kekoawong Aug 17, 2022
84c4ed0
Updated format on documentation
kekoawong Aug 17, 2022
ef2939f
Merge pull request #18 from maetio/dev
kekoawong Aug 17, 2022
686e40b
Updated documentation
kekoawong Sep 6, 2022
5f71655
Created PR template
kekoawong Sep 7, 2022
248d197
Added bug report template
kekoawong Sep 7, 2022
23ed971
Added feature request
kekoawong Sep 7, 2022
6bdf977
Added the enhancement template
kekoawong Sep 7, 2022
e8a8637
Merge pull request #20 from maetio/dev
kekoawong Sep 7, 2022
199402f
first commit and working test online
SethY8s Nov 3, 2022
43045a9
final changes before readME
SethY8s Nov 3, 2022
fa0df57
updated readme
SethY8s Nov 3, 2022
1edc8f2
Saving before I forget
SethY8s Nov 3, 2022
b934e22
Finished instructions now need to get resources
SethY8s Nov 3, 2022
a8f9b2b
Typos and resources
SethY8s Nov 3, 2022
1603b59
Final changes to README in functions folder
SethY8s Nov 4, 2022
752ea53
Rename Root.tsx to root.tsx
kekoawong Nov 4, 2022
0c68e0e
Added TS to code lines and removed bash code lines
SethY8s Nov 4, 2022
eb4b238
added storybook and able to view page on expo
SethY8s Nov 6, 2022
11a7ca1
working storybook setup
SethY8s Nov 7, 2022
031a1a1
working super basic flatlist
SethY8s Nov 7, 2022
2fef9cf
working flatlist with products component
SethY8s Nov 7, 2022
d721652
added a lot of code from mobile-payment-example for RTK and redux con…
SethY8s Nov 7, 2022
6a3ca6f
added console log addon for storybook
SethY8s Nov 8, 2022
abd5347
Added initial config
kekoawong Nov 8, 2022
2f727a5
Fixed function testing to work, tests passing
kekoawong Nov 8, 2022
0a1d22e
Removed error with keys
kekoawong Nov 8, 2022
8133286
Issue with permissions
kekoawong Nov 8, 2022
539be73
tried adding RTK, however did not work and async await firebase funct…
SethY8s Nov 9, 2022
d9aa2f2
final commit before switching to v6 beta
SethY8s Nov 9, 2022
98493a3
working v6 react-native storybook
SethY8s Nov 9, 2022
ef7658a
changes for discussion
SethY8s Nov 9, 2022
3e1ab02
Fixed error associated with google cloud
kekoawong Nov 9, 2022
c4955d6
Added env variables
kekoawong Nov 9, 2022
a365057
Reorganizing functions to users
kekoawong Nov 10, 2022
4df9ede
Updated naming conventions
kekoawong Nov 10, 2022
36f22da
Updated user types
kekoawong Nov 10, 2022
5ccb284
onWrite function and testing working
kekoawong Nov 10, 2022
694dcfd
Updated documentation - now have to fix the state management
kekoawong Nov 10, 2022
13a5939
updated all storybase packages to v6+
SethY8s Nov 10, 2022
287e4b2
Updated documentation and reorganized repo
kekoawong Nov 14, 2022
8d35e4d
Updated user slice
kekoawong Nov 14, 2022
45e8d63
Initialized services directory
kekoawong Nov 14, 2022
c0b92a1
Added firebase and firestore initialization with generic converter types
kekoawong Nov 14, 2022
1588f53
Typed the firebase auth-api
kekoawong Nov 14, 2022
4654155
Added user-api definition
kekoawong Nov 14, 2022
0fb22d2
Added firestore get handler for docs
kekoawong Nov 14, 2022
431191b
Configured services
kekoawong Nov 14, 2022
f449c0a
Progress on the auth-api for rtk query
kekoawong Nov 14, 2022
eac8a44
need to still update rest of auth-api in services
kekoawong Nov 14, 2022
a75e1ce
Updated documentation code with tsdoc
kekoawong Nov 15, 2022
4a86fc9
Updated documentation
kekoawong Nov 15, 2022
8250094
Added user slice documentation
kekoawong Nov 15, 2022
105f503
Completed progress on auth-api with documentation
kekoawong Nov 16, 2022
3098094
Configured redux store with rtk query
kekoawong Nov 16, 2022
798d49c
Added state matchers and deleted other portions of state management
kekoawong Nov 16, 2022
2bb1f0e
Updated types and exporting
kekoawong Nov 16, 2022
d4982f3
Updated type declarations
kekoawong Nov 16, 2022
e641ec9
rewroe the welcome and login screen
kekoawong Nov 16, 2022
cf73c6e
Updated screens with rtk query
kekoawong Nov 16, 2022
ef538d6
Altered props
kekoawong Nov 16, 2022
5df611e
added fonts
kekoawong Nov 16, 2022
232b13a
Added font initialization
kekoawong Nov 16, 2022
6305ff2
Added linting and prettier configuration
kekoawong Nov 16, 2022
a30d606
Configured eslint configuration
kekoawong Nov 16, 2022
8d4f2e8
Curious firebase function testing no longer working
kekoawong Nov 16, 2022
65ec85e
Removed testing files from functions
kekoawong Nov 16, 2022
7495e93
Discovered error with process.env, need to emulate and configure env
kekoawong Nov 16, 2022
d8d6f8d
Fixed serve error - issue with the imports
kekoawong Nov 16, 2022
7fe3acb
Fixing process.env configuration - need to find firebase command
kekoawong Nov 16, 2022
cdb86b1
Some progress with process.env - showing up in the log
kekoawong Nov 16, 2022
45dbe2e
restuctured repo - not including tests in linting
kekoawong Nov 16, 2022
6c79fb4
Completed fixes
kekoawong Nov 16, 2022
0607978
built basic componenet with native base and storybook
SethY8s Nov 16, 2022
b4d2401
added a template to have differnt version of same story
SethY8s Nov 16, 2022
3bdbe5d
added web storybook
SethY8s Nov 17, 2022
aa92bf8
final commit before copying tmeplate
SethY8s Nov 17, 2022
8fd607f
working storybook Ui and able to change props from Ui
SethY8s Nov 17, 2022
d37f769
storybook components are now coming from the components folder in src
SethY8s Nov 17, 2022
afec600
added basic stories for testing
SethY8s Nov 17, 2022
5d37558
Added firebase function testing for undefined - error with memory leak
kekoawong Nov 17, 2022
f6658d5
Added verification email send in the services sign-up
kekoawong Nov 17, 2022
a4f0935
added more styling so component is centered, and fixed bug that made …
SethY8s Nov 17, 2022
56beb17
Deleted screen params type
kekoawong Nov 17, 2022
e802b37
Initialized user-api in services
kekoawong Nov 17, 2022
9ee0e11
Updated get handler for firebase
kekoawong Nov 17, 2022
fb14cf9
Added getUsers function
kekoawong Nov 17, 2022
ee3b5ad
Added users query to services
kekoawong Nov 17, 2022
d95f398
Added pagination to explore screen
kekoawong Nov 18, 2022
5baa3ca
Pagination complete
kekoawong Nov 18, 2022
7502486
fixed more typing and final commit before making full screen component
SethY8s Nov 18, 2022
42d877f
fixed but that stopped onPress when importing image upload comp
SethY8s Nov 18, 2022
f022750
Fixed minor firebase function error
kekoawong Nov 18, 2022
bde7abf
Merge branch 'main' into online-test
kekoawong Nov 18, 2022
b3baec7
Reorganized functions
kekoawong Nov 18, 2022
eceb9d0
Formatted code
kekoawong Nov 18, 2022
0943f50
cleaned up code for PR
SethY8s Nov 18, 2022
941d445
deleted old storybook v5 code and added README to storybook folder
SethY8s Nov 18, 2022
e82dfaf
made README
SethY8s Nov 18, 2022
d1f36ce
Linting error with functions directory
kekoawong Nov 18, 2022
2e3f87c
fixed functions error
kekoawong Nov 18, 2022
207f624
Completed linting
kekoawong Nov 18, 2022
43edf4d
Minor warning error with signing in
kekoawong Nov 18, 2022
4cc0443
Merge pull request #27 from maetio/online-test
kekoawong Nov 18, 2022
e64929f
first edits - built alert toast story
kekoawong Nov 18, 2022
c25fd93
commit
SethY8s Nov 19, 2022
ae0a262
working docs for storybook, actions still needed
SethY8s Nov 20, 2022
aaae1f3
working onPress action in action page
SethY8s Nov 20, 2022
9022d13
added another template under basic button
SethY8s Nov 20, 2022
b624f65
clean up code and formated for PR
SethY8s Nov 20, 2022
1334ebc
fixed all linting errors for PR
SethY8s Nov 21, 2022
842cf8e
Fixed merge conflicts
kekoawong Nov 21, 2022
45a8a60
Merge pull request #31 from maetio/storybook-form
kekoawong Nov 21, 2022
1f21c77
changed naming conventions
kekoawong Nov 21, 2022
56e136a
Completed initial merge conflicts
kekoawong Nov 21, 2022
456bb55
Issue with starting storybook versus expo
kekoawong Nov 21, 2022
4a7b36e
Merge pull request #28 from maetio/storybook
kekoawong Nov 21, 2022
7755c0e
working v-2 branch
SethY8s Nov 22, 2022
02576c8
added navigation for profile screen
SethY8s Nov 22, 2022
6588bd9
Renamed service account key, added to gitignore
kekoawong Nov 23, 2022
c7be570
Transitioned keyboard avoiding behavior, still error with module reso…
kekoawong Nov 24, 2022
70e3536
Deleted product queries
kekoawong Nov 24, 2022
1cf4545
Cleaned up product files, changed types
kekoawong Nov 24, 2022
fb79d3b
Fixed import module bug, was with Maet's svg icon
kekoawong Nov 24, 2022
ba47974
Fixed keyboard avoiding behavior
kekoawong Nov 24, 2022
285f9f3
Fixed title
kekoawong Nov 24, 2022
13c87f7
Deleted unused wrappers
kekoawong Nov 24, 2022
d8a4ff0
adding functions for RTK
SethY8s Nov 24, 2022
40d7a78
merged in Kekoa's changes to dev-v2
SethY8s Nov 24, 2022
1b9e57f
fixed some basic navigation for profile screen
SethY8s Nov 24, 2022
3ae570e
user's now make a document in FB storage when they signup
SethY8s Nov 24, 2022
7a86e9d
working rtk query
SethY8s Nov 25, 2022
d091d8c
cleaned typing and sometimes working
SethY8s Nov 25, 2022
9241827
adding default image when user signs up
SethY8s Nov 25, 2022
e5af2a5
firbase function wokring
SethY8s Nov 25, 2022
4d88c14
working function that upload firebase storage uri to firestore
SethY8s Nov 26, 2022
9c467a8
somewhat working version, loads sometimes, but not everytime
SethY8s Nov 26, 2022
7cfc516
More consisdent rending of the image using refetch function
SethY8s Nov 27, 2022
6624c9f
working image upload component and profile screen
SethY8s Nov 27, 2022
b5209e9
ran yarn lint --fix
SethY8s Nov 28, 2022
45201ea
used converted to fix type coming back from firebase
SethY8s Nov 28, 2022
ff5cd4a
fixed all serious linting issues
SethY8s Nov 28, 2022
0fb82f1
working default profile picture API
SethY8s Nov 28, 2022
2c63bd5
added profile screen only if logged in
SethY8s Nov 28, 2022
66eb7d2
fixed all linting errors
SethY8s Nov 28, 2022
028840d
final testing and cleaning up code
SethY8s Nov 28, 2022
a6e5d3c
added documentation to functions and moved image-api into user-api
SethY8s Nov 29, 2022
a360a78
added fall back on iamge incase data comes back undefined
SethY8s Nov 29, 2022
3952339
removed firebase/image-api and changed bottom tab icon to MaterialIcons
SethY8s Nov 29, 2022
f857a09
added box to edit profile screen and some linting
SethY8s Nov 29, 2022
298b241
working story for input
SethY8s Nov 29, 2022
ef41497
started .ondevice folder
SethY8s Nov 29, 2022
73f5127
working environmental varibles and new update for storybook removed H…
SethY8s Nov 29, 2022
efa4c98
Added user-card for explore screen
kekoawong Nov 30, 2022
8fc5d0e
fixed linting, removed image api, added documentation, fixed package.…
SethY8s Nov 30, 2022
33eff21
Fixed spinner loading
kekoawong Nov 30, 2022
ae180d6
Merge pull request #32 from maetio/dev-v2-RTKnew
kekoawong Nov 30, 2022
e6e4ef6
Altered icon story - fixed compilation errors
kekoawong Nov 30, 2022
739acd8
Removed storybook for screens
kekoawong Nov 30, 2022
267d42f
Migrated upload file to the storage api
kekoawong Nov 30, 2022
d1d7192
Initialized user card stories
kekoawong Nov 30, 2022
d78e2d5
Added user card components
kekoawong Nov 30, 2022
76832ca
Updated user image function
kekoawong Nov 30, 2022
10adddc
integrated avatar into user profile image
kekoawong Nov 30, 2022
eb40d08
Added camera button on the image uploader
kekoawong Nov 30, 2022
9686622
Configured home screen
kekoawong Nov 30, 2022
d2cf6bf
Added setting screen navigation
kekoawong Nov 30, 2022
21bc003
Reorganized profile navigation
kekoawong Nov 30, 2022
b8b290a
Changed screen naming conventions
kekoawong Nov 30, 2022
5c46c86
Altered settings formatting
kekoawong Nov 30, 2022
4e6b37e
minor changes to get up and running
SethY8s Nov 30, 2022
ac885df
added basic mutation
SethY8s Nov 30, 2022
f22bafc
started password screen and made change email function in auth-api
SethY8s Nov 30, 2022
80126dc
added basic navigation to change password screen
SethY8s Dec 1, 2022
01582aa
added form validation for passwords
SethY8s Dec 1, 2022
fcad65f
Fixed Keyboard dismiss
SethY8s Dec 1, 2022
641b195
working change email function... needs more testing to make consistend
SethY8s Dec 2, 2022
a9045a4
working change email mutation
SethY8s Dec 2, 2022
434fe5c
working reset password by email function
SethY8s Dec 2, 2022
cd6be45
commit before flight
SethY8s Dec 2, 2022
7f7b25d
Merge pull request #33 from maetio/dev-v2-updateUser-mutation
kekoawong Dec 2, 2022
8628684
Reorganized image functions
kekoawong Dec 2, 2022
201869f
Progress with restructure query
kekoawong Dec 2, 2022
5f138b7
query changes
kekoawong Dec 2, 2022
25a3cf0
Added images and brief description
SethY8s Dec 3, 2022
e5a57fb
Added images to sotrybook
SethY8s Dec 3, 2022
62847ae
Added successful image upload query
kekoawong Dec 3, 2022
0ae8d75
Deleted previous fetch user image function
kekoawong Dec 3, 2022
73e81ef
deleted the imageOBJ type
kekoawong Dec 3, 2022
a80080a
Added default values to the settings screen
kekoawong Dec 3, 2022
3963c19
User image upload working
kekoawong Dec 3, 2022
0e334c0
Added user feedback
kekoawong Dec 3, 2022
1cb0a19
Updated user feedback, deleted default image with low res
kekoawong Dec 5, 2022
a8213b9
Updated yup schemas with types
kekoawong Dec 5, 2022
a693da1
Password update working
kekoawong Dec 5, 2022
2ed649c
Added service query for updating email
kekoawong Dec 5, 2022
7887053
Added matcher in the state
kekoawong Dec 5, 2022
1c8dd0a
Added navigators for different screens
kekoawong Dec 5, 2022
a98a747
Issue with getting firebase storage image
kekoawong Dec 5, 2022
d383cc4
Issue with image upload, fetching from firebase instead of local uri
kekoawong Dec 5, 2022
cfecb99
Added update password schema
kekoawong Dec 5, 2022
8b6ab23
Added schemas for deleting account
kekoawong Dec 5, 2022
f7cbf2e
Added delete account screen
kekoawong Dec 5, 2022
8a92113
Added userfields
kekoawong Dec 5, 2022
a3039a9
auth/user-mismatch error
kekoawong Dec 5, 2022
86fac3d
got template to run properly on android
SethY8s Dec 5, 2022
4cbeb47
fixed TS and linting erros, also everything is working on android
SethY8s Dec 5, 2022
32df96f
Added icons to disclusure sheet
kekoawong Dec 5, 2022
7027fb1
Fixed firebase error
kekoawong Dec 5, 2022
8c299f3
Added conditional routing for auth
kekoawong Dec 5, 2022
1bc56b8
Fixed all doucmentation and final changes
SethY8s Dec 5, 2022
d4e9237
Added settings disabled if user is anonymous
kekoawong Dec 5, 2022
79c6dd7
took out console.logs
kekoawong Dec 5, 2022
0e0e0ff
Merge branch 'dev-v2' into dev-v2-final-edits
kekoawong Dec 5, 2022
f9cda39
Merge pull request #35 from maetio/dev-v2-final-edits
kekoawong Dec 5, 2022
f00776c
Added videos instead of photos
SethY8s Dec 5, 2022
1436832
Centered Videos and changed names
SethY8s Dec 5, 2022
371dcb1
Updated documentation
kekoawong Dec 5, 2022
e0fb21a
Updated new documentation
kekoawong Dec 5, 2022
c7ffb27
Published to npm
kekoawong Dec 5, 2022
9adb688
Merge pull request #34 from maetio/dev-v2
kekoawong Dec 5, 2022
d54ee8c
Bump decode-uri-component from 0.2.0 to 0.2.2
dependabot[bot] Dec 5, 2022
d7951e2
Bump loader-utils from 1.4.1 to 1.4.2
dependabot[bot] Dec 5, 2022
be58ff4
Bump react-native-reanimated from 2.8.0 to 2.10.0
dependabot[bot] Dec 5, 2022
53d1eb7
Added documentation edit
kekoawong Dec 5, 2022
9d8af01
Merge pull request #38 from maetio/dev-v2
kekoawong Dec 5, 2022
c4987be
Merge pull request #37 from maetio/dependabot/npm_and_yarn/loader-uti…
kekoawong Dec 5, 2022
6f5bc41
Merge pull request #36 from maetio/dependabot/npm_and_yarn/decode-uri…
kekoawong Dec 5, 2022
39f5a13
Merge pull request #25 from maetio/dependabot/npm_and_yarn/react-nati…
kekoawong Dec 5, 2022
a887cc7
Updated main readme
kekoawong Sep 8, 2024
e30ebbb
Merge pull request #52 from delphictech/kekoawong/update-v1
kekoawong Sep 8, 2024
56c3017
Removed old v1 files
kekoawong Sep 8, 2024
686820f
Merge branch 'v2' into kekoawong/v2-main-merge
kekoawong Sep 8, 2024
ef11983
Merge pull request #53 from delphictech/kekoawong/v2-main-merge
kekoawong Sep 8, 2024
1942568
Seth y8s/45 add rtk (#54)
SethY8s Sep 8, 2024
695d619
Removed PR template (#55)
kekoawong Sep 8, 2024
bce38f8
Added firebase to the repo (#56)
SethY8s Oct 1, 2024
d33850b
58 fixed footer to correct icons and names
SethY8s Oct 2, 2024
af6cd32
58 added redux store for private user data and api calls
SethY8s Oct 9, 2024
88790c6
58 added correctly layout and redux state for profile screen
SethY8s Oct 12, 2024
0139d0d
58 created root navigator
SethY8s Oct 12, 2024
f306be8
58 fixed layout to removed header on screens
SethY8s Oct 22, 2024
8c5f6b8
58 added FormInput component
SethY8s Nov 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// https://docs.expo.dev/guides/using-eslint/
module.exports = {
extends: 'expo',
};
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/1-bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: "🐞 Bug Report"
about: "Report a bug that you may have discovered."
title: "[Insert Bug Name]"
labels: "bug"

---

### 📍 **What is the expected behavior?**
___
> *Insert response here...*


### 🐞 **What is the actual behavior?**
___
> *Insert response here...*

### ⚙️ **Steps to reproduce:**
___
<!-- Clearly layout the actions to test, pointing out where the behavior deviates from expected. -->
1. Insert Step One...
2. Insert Step Two...

### 📹 **Media Evidence:**
___
> *If applicable, add an image or a video to depict the bug.*

### 🪴 **Your environment:**
___
<!--
If applicabale to mobile, describe the following at least:
1. Android vs. iOS,
2. Operating system version number
2. Phone Model
If applicable to your development environment, describe the following at least:
1. Node version
2. Expo version
3. Mac or PC
-->
> *Insert response here...*
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/2-feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: "🚀 Feature Request"
about: "Suggest an idea or possible new feature for this project."
title: "[New Feature]"
labels: "new-feature"

---

### 🚀 **Describe the proposed feature:**
___
> *Insert response here...*


### ✨ **Why is this new feature beneficial?**
___
> *Insert response here...*

### 💡 **Inspiration or references:**
___
<!-- Please provide links to similar features to help us get a better understanding, or clearly describe how you thought of this. -->
- [Example Link](https://www.maet.io/)
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/3-enhancement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: "🌟 Enhancement Request"
about: "Suggest an enhancement for this project. Improve an existing feature."
title: "[Enhancement Name]"
labels: "enhancement"

---

### 🌟 **Describe this enhancement:**
___
> *Insert response here...*


### ❓ **Why is this enhancement needed or beneficial?**
___
> *Insert response here...*

### 🔗 **Useful Resources:**
___
<!-- Please provide links or descriptions that may help us understand how to build this enhancement, or your reasoning behind it. -->
- [Example Link](https://www.maet.io/)
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ npm-debug.*
*.mobileprovision
*.orig.*
web-build/
.env
.env*
.env.prod
.env.dev

# macOS
.DS_Store
Expand Down
9 changes: 9 additions & 0 deletions app/(auth)/_layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Stack } from 'expo-router';

export default function AuthLayout() {
return (
<Stack >
<Stack.Screen name="login" options={{headerShown: false }} />
</Stack>
);
}
33 changes: 33 additions & 0 deletions app/(auth)/login.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { Link, useNavigation } from "expo-router";
import React, { useEffect } from "react";
import { View, Text } from "react-native";
import { LoginComponent } from "~/components/login";
import { Button } from "~/components/ui/button";

export default function Login() {
console.log("login fired");

// const navigation = useNavigation();

// useEffect(() => {
// navigation.setOptions({ headerShown: false });
// }, [navigation]);

return (
<View className="w-100">
<LoginComponent />
{/* <Button variant="destructive">
<Text>Default button from library</Text>
</Button> */}
<View className="w-full flex justify-center items-center">
<Text className="text-red-500 text-center my-4">Don't have an account?</Text>

<Link href="/signup">Signup</Link>
</View>
</View>
);
}

export const options = {
headerShown: false, // Hide the header
};
51 changes: 41 additions & 10 deletions app/(tabs)/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
import { Tabs } from 'expo-router';
import React from 'react';
import { Tabs, useNavigation, useRouter } from 'expo-router';
import React, { useEffect } from 'react';
import { Pressable } from 'react-native';

import { TabBarIcon } from '@/components/navigation/TabBarIcon';
import { Colors } from '@/constants/Colors';
import { useColorScheme } from '@/hooks/useColorScheme';
import { TabBarIcon } from '~/components/navigation/TabBarIcon';
import { Colors } from '~/constants/Colors';
import { useColorScheme } from '~/hooks/useColorScheme';
import { useAppSelector } from '~/redux/useful-hooks';

export default function TabLayout() {
const colorScheme = useColorScheme();
// const navigation = useNavigation();
const router = useRouter();

// redux handlers
const user = useAppSelector((state) => state.user.loggedIn);

return (
<Tabs
Expand All @@ -17,18 +24,42 @@ export default function TabLayout() {
<Tabs.Screen
name="index"
options={{
title: 'Home',
title: 'Explore',
tabBarIcon: ({ color, focused }) => (
<TabBarIcon name={focused ? 'home' : 'home-outline'} color={color} />
<TabBarIcon name={focused ? 'search' : 'search-outline'} color={color} />
),
}}
/>
<Tabs.Screen
name="explore"
name="map"
options={{
title: 'Explore',
title: 'Map',
tabBarIcon: ({ color, focused }) => (
<TabBarIcon name={focused ? 'earth' : 'earth-outline'} color={color} />
),
}}
/>

<Tabs.Screen
name="profile"
options={{
title: 'Profile',
tabBarIcon: ({ color, focused }) => (
<TabBarIcon name={focused ? 'code-slash' : 'code-slash-outline'} color={color} />
<TabBarIcon name={focused ? 'person' : 'person-outline'} color={color} />
),
tabBarButton: (props) => (
<Pressable
{...props}
onPress={() => {
if (user) {
router.push('/profile');
} else {
router.push('/login');
}
}}
>
{props.children}
</Pressable>
),
}}
/>
Expand Down
102 changes: 0 additions & 102 deletions app/(tabs)/explore.tsx

This file was deleted.

Loading