diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index feafe32e..4e2e7f80 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: - node-version: [16.x] + node-version: [18.x] steps: - uses: actions/checkout@v1 diff --git a/.vscode/settings.json b/.vscode/settings.json index 893eddd6..70ffdf77 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,5 @@ { - "cSpell.words": ["icomoon"], + "cSpell.words": ["icomoon", "notificated", "postsecondary"], "todohighlight.keywords": [ { "text": "CONFIG:", diff --git a/App.tsx b/App.tsx index d7211dba..e22bc10e 100644 --- a/App.tsx +++ b/App.tsx @@ -1,12 +1,15 @@ // FIXME: see how why did you render works // import './wdyr' + +// This is added to support web for reaniamted: https://github.com/software-mansion/react-native-reanimated/issues/4140#issuecomment-1455209588 import 'setimmediate' import 'react-native-reanimated' + +// Rest imports import '~i18n' import * as Device from 'expo-device' +import 'expo-router/entry' -import { Navigation } from '~navigation' -import { Providers } from '~providers' import { enableAndroidBackgroundNotificationListener, startMockedServer } from '~services' // FIXME: there is some issue with miragejs that causes console.log to not work @@ -27,13 +30,3 @@ if (DISABLE_CONSOLE_ENABLE_MOCKED_SERVER) { if (Device.isDevice) { enableAndroidBackgroundNotificationListener() } - -const App = (): JSX.Element => { - return ( - - - - ) -} - -export default App diff --git a/app.json b/app.json index ece771cb..660fdbf7 100644 --- a/app.json +++ b/app.json @@ -22,6 +22,9 @@ }, "userInterfaceStyle": "automatic", "version": "2.1.0", - "plugins": ["expo-font", "expo-localization", "expo-secure-store"] + "plugins": ["expo-font", "expo-localization", "expo-secure-store", "expo-router"], + "web": { + "bundler": "metro" + } } } diff --git a/app/(app)/(auth)/_layout.tsx b/app/(app)/(auth)/_layout.tsx new file mode 100644 index 00000000..df38fb8e --- /dev/null +++ b/app/(app)/(auth)/_layout.tsx @@ -0,0 +1,17 @@ +import { Redirect, Stack } from 'expo-router' + +import { useAuth } from '~hooks' + +export const unstable_settings = { + initialRouteName: 'sign-in', +} + +export default function AuthLayout() { + const { isSignedIn } = useAuth() + + if (isSignedIn === true) { + return + } + + return +} diff --git a/app/(app)/(auth)/sign-in.tsx b/app/(app)/(auth)/sign-in.tsx new file mode 100644 index 00000000..f75d4a25 --- /dev/null +++ b/app/(app)/(auth)/sign-in.tsx @@ -0,0 +1,3 @@ +import { SignInScreen } from '~screens' + +export default SignInScreen diff --git a/app/(app)/(auth)/sign-up.tsx b/app/(app)/(auth)/sign-up.tsx new file mode 100644 index 00000000..94ad1b91 --- /dev/null +++ b/app/(app)/(auth)/sign-up.tsx @@ -0,0 +1,3 @@ +import { SignUpScreen } from '~screens' + +export default SignUpScreen diff --git a/app/(app)/(modals)/_layout.tsx b/app/(app)/(modals)/_layout.tsx new file mode 100644 index 00000000..47022e3b --- /dev/null +++ b/app/(app)/(modals)/_layout.tsx @@ -0,0 +1,9 @@ +import { Stack } from 'expo-router' + +export const unstable_settings = { + initialRouteName: 'application-info', +} + +export default function ModalsLayout() { + return +} diff --git a/app/(app)/(modals)/application-info.tsx b/app/(app)/(modals)/application-info.tsx new file mode 100644 index 00000000..d6ae0616 --- /dev/null +++ b/app/(app)/(modals)/application-info.tsx @@ -0,0 +1,3 @@ +import { ApplicationInfoScreen } from '~screens' + +export default ApplicationInfoScreen diff --git a/app/(app)/(tabs)/_layout.tsx b/app/(app)/(tabs)/_layout.tsx new file mode 100644 index 00000000..4209b19f --- /dev/null +++ b/app/(app)/(tabs)/_layout.tsx @@ -0,0 +1,18 @@ +import { Redirect } from 'expo-router' + +import { useAuth } from '~hooks' +import { ResponsiveNavigator } from '~navigation/tabNavigator/navigator' + +export const unstable_settings = { + initialRouteName: 'home', +} + +export default function TabLayout() { + const { isSignedIn } = useAuth() + + if (isSignedIn === false) { + return + } + + return +} diff --git a/app/(app)/(tabs)/example/_layout.tsx b/app/(app)/(tabs)/example/_layout.tsx new file mode 100644 index 00000000..92789ee5 --- /dev/null +++ b/app/(app)/(tabs)/example/_layout.tsx @@ -0,0 +1,9 @@ +import { Stack } from 'expo-router' + +export const unstable_settings = { + initialRouteName: 'index', +} + +export default function DynamicLayout() { + return +} diff --git a/app/(app)/(tabs)/example/colors.tsx b/app/(app)/(tabs)/example/colors.tsx new file mode 100644 index 00000000..6721eee5 --- /dev/null +++ b/app/(app)/(tabs)/example/colors.tsx @@ -0,0 +1,3 @@ +import { ColorsScreen } from '~screens' + +export default ColorsScreen diff --git a/app/(app)/(tabs)/example/components.tsx b/app/(app)/(tabs)/example/components.tsx new file mode 100644 index 00000000..6f5c79e2 --- /dev/null +++ b/app/(app)/(tabs)/example/components.tsx @@ -0,0 +1,3 @@ +import { ComponentsScreen } from '~screens' + +export default ComponentsScreen diff --git a/app/(app)/(tabs)/example/data-from-be.tsx b/app/(app)/(tabs)/example/data-from-be.tsx new file mode 100644 index 00000000..e7368d3a --- /dev/null +++ b/app/(app)/(tabs)/example/data-from-be.tsx @@ -0,0 +1,3 @@ +import { DataFromBeScreen_EXAMPLE } from '~screens' + +export default DataFromBeScreen_EXAMPLE diff --git a/app/(app)/(tabs)/example/index.tsx b/app/(app)/(tabs)/example/index.tsx new file mode 100644 index 00000000..5343ca7f --- /dev/null +++ b/app/(app)/(tabs)/example/index.tsx @@ -0,0 +1,3 @@ +import { ExamplesScreen } from '~screens' + +export default ExamplesScreen diff --git a/app/(app)/(tabs)/example/test-form.tsx b/app/(app)/(tabs)/example/test-form.tsx new file mode 100644 index 00000000..16c87b63 --- /dev/null +++ b/app/(app)/(tabs)/example/test-form.tsx @@ -0,0 +1,3 @@ +import { TestFormScreen } from '~screens' + +export default TestFormScreen diff --git a/app/(app)/(tabs)/example/typography.tsx b/app/(app)/(tabs)/example/typography.tsx new file mode 100644 index 00000000..467b08e6 --- /dev/null +++ b/app/(app)/(tabs)/example/typography.tsx @@ -0,0 +1,3 @@ +import { TypographyScreen } from '~screens' + +export default TypographyScreen diff --git a/app/(app)/(tabs)/home/_layout.tsx b/app/(app)/(tabs)/home/_layout.tsx new file mode 100644 index 00000000..92789ee5 --- /dev/null +++ b/app/(app)/(tabs)/home/_layout.tsx @@ -0,0 +1,9 @@ +import { Stack } from 'expo-router' + +export const unstable_settings = { + initialRouteName: 'index', +} + +export default function DynamicLayout() { + return +} diff --git a/app/(app)/(tabs)/home/details.tsx b/app/(app)/(tabs)/home/details.tsx new file mode 100644 index 00000000..45347ddb --- /dev/null +++ b/app/(app)/(tabs)/home/details.tsx @@ -0,0 +1,3 @@ +import { DetailsScreen } from '~screens' + +export default DetailsScreen diff --git a/app/(app)/(tabs)/home/index.tsx b/app/(app)/(tabs)/home/index.tsx new file mode 100644 index 00000000..dbfe4261 --- /dev/null +++ b/app/(app)/(tabs)/home/index.tsx @@ -0,0 +1,3 @@ +import { HomeScreen } from '~screens' + +export default HomeScreen diff --git a/app/(app)/(tabs)/settings/_layout.tsx b/app/(app)/(tabs)/settings/_layout.tsx new file mode 100644 index 00000000..92789ee5 --- /dev/null +++ b/app/(app)/(tabs)/settings/_layout.tsx @@ -0,0 +1,9 @@ +import { Stack } from 'expo-router' + +export const unstable_settings = { + initialRouteName: 'index', +} + +export default function DynamicLayout() { + return +} diff --git a/app/(app)/(tabs)/settings/index.tsx b/app/(app)/(tabs)/settings/index.tsx new file mode 100644 index 00000000..8e6518a0 --- /dev/null +++ b/app/(app)/(tabs)/settings/index.tsx @@ -0,0 +1,3 @@ +import { SettingsScreen } from '~screens' + +export default SettingsScreen diff --git a/app/(app)/_layout.tsx b/app/(app)/_layout.tsx new file mode 100644 index 00000000..c4bc25a2 --- /dev/null +++ b/app/(app)/_layout.tsx @@ -0,0 +1,11 @@ +import { Stack } from 'expo-router' + +export default function AppLayout() { + return ( + + + + + + ) +} diff --git a/app/+html.tsx b/app/+html.tsx new file mode 100644 index 00000000..94f3c90c --- /dev/null +++ b/app/+html.tsx @@ -0,0 +1,46 @@ +import { ScrollViewStyleReset } from 'expo-router/html' + +// This file is web-only and used to configure the root HTML for every +// web page during static rendering. +// The contents of this function only run in Node.js environments and +// do not have access to the DOM or browser APIs. +export default function Root({ children }: { children: React.ReactNode }) { + return ( + + + + + + {/* + This viewport disables scaling which makes the mobile website act more like a native app. + However this does reduce built-in accessibility. If you want to enable scaling, use this instead: + + */} + + {/* + Disable body scrolling on web. This makes ScrollView components work closer to how they do on native. + However, body scrolling is often nice to have for mobile web. If you want to enable it, remove this line. + */} + + + {/* Using raw CSS styles as an escape-hatch to ensure the background color never flickers in dark-mode. */} +