Skip to content

Migrate to expo-router#91

Merged
AtlantisPleb merged 6 commits intoOpenAgentsInc:mainfrom
reyamir:migrate-to-expo-router
May 1, 2023
Merged

Migrate to expo-router#91
AtlantisPleb merged 6 commits intoOpenAgentsInc:mainfrom
reyamir:migrate-to-expo-router

Conversation

@reyamir
Copy link
Contributor

@reyamir reyamir commented May 1, 2023

Add:

  • Move create-account page to app under (auth) group
  • Move login page to app under (auth) group
  • Other pages is placed under (main) group

Changes:

  • When user signup successfully, auto redirect back to splashscreen (router.push('/'))
  • In splashscreen, check user logged or not, if logged redirect to channels page
useFocusEffect(() => {
    if (authed) {
      router.replace('/home/channels')
    }
})
  • Use dynamic route for channel page, example: /channels/[id]
  • In channel page, use useSearchParams() hook to get channel id & name
const { id, name }: any = useSearchParams()

Route structure

├── auth
│   ├── create-account
│   ├── login
├── main
│   ├── home (tabs navigator)
│   │   ├── channels
│   │   ├── contacts
│   │   ├── settings
│   ├── others (native stacks)

Checklist

  • /create-account
  • /login
  • /channels
  • /channels/[id]
  • /contacts
  • /settings
  • /relays
  • /posts
  • /posts[id]
  • /wallet

@vercel
Copy link

vercel bot commented May 1, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
arcade ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 1, 2023 11:35am

@reyamir reyamir marked this pull request as ready for review May 1, 2023 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants