-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from leanhtuan1994/dev
Update changes
- Loading branch information
Showing
45 changed files
with
216 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,3 +57,6 @@ buck-out/ | |
|
||
# CocoaPods | ||
/ios/Pods/ | ||
|
||
# Test | ||
__snapshots__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-57.6 KB
android/app/src/main/assets/fonts/iCielGalanoGrotesque-SemiBold.otf
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
app/components/__tests__/__snapshots__/NavBar.test.tsx.snap
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
app/components/__tests__/__snapshots__/NotificationContainer.test.tsx.snap
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import type React from 'react'; | ||
import { createRef } from 'react'; | ||
import type { | ||
NavigationContainerRef, | ||
NavigationProp, | ||
ParamListBase, | ||
RouteProp, | ||
} from '@react-navigation/core'; | ||
|
||
export const navigateRef = createRef<NavigationContainerRef>(); | ||
|
||
export type ScreenComponent< | ||
P extends ParamListBase = ParamListBase, | ||
N extends keyof P = string, | ||
> = React.ComponentType<{ | ||
route: RouteProp<P, N>; | ||
navigation: NavigationProp<P>; | ||
}>; | ||
|
||
type ScreenType< | ||
P extends ParamListBase, | ||
N extends keyof P, | ||
O extends Record<string, unknown>, | ||
> = { | ||
screen: { | ||
name: N; | ||
component: ScreenComponent<P, N>; | ||
options?: O; | ||
}; | ||
present: (n: NavigationProp<P>, p?: P[N]) => void; | ||
}; | ||
|
||
export function registerScreen< | ||
P extends ParamListBase = ParamListBase, | ||
N extends keyof P = string, | ||
O extends Record<string, unknown> = Record<string, unknown>, | ||
>(name: N, Comp: ScreenComponent<P, N>, options?: O): ScreenType<P, N, O> { | ||
return { | ||
screen: { | ||
name, | ||
component: Comp, | ||
options, | ||
}, | ||
present: (navigation: NavigationProp<P>, params?: P[N]) => { | ||
navigation.navigate({ name, params: params as P[N] }); | ||
}, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './Navigation'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,19 @@ | ||
import React from 'react'; | ||
import { View } from 'react-native'; | ||
import type { ScreenComponent } from '@navigation/utils'; | ||
import { registerScreen } from '@navigation/utils'; | ||
|
||
const HomeScreen = () => { | ||
const Name = 'HomeScreen'; | ||
|
||
export type HomeScreenParam = { | ||
[Name]: Record<string, unknown>; | ||
}; | ||
|
||
const HomeScreen: ScreenComponent<HomeScreenParam, 'HomeScreen'> = () => { | ||
return <View />; | ||
}; | ||
|
||
export default HomeScreen; | ||
export default registerScreen<HomeScreenParam, 'HomeScreen'>( | ||
'HomeScreen', | ||
HomeScreen, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { en as common } from 'languages'; | ||
import { en as common } from '@languages'; | ||
|
||
const en = { | ||
common, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { vi as common } from 'languages'; | ||
import { vi as common } from '@languages'; | ||
|
||
const vi = { | ||
common, | ||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.