-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
46adbd6
commit 993d5c0
Showing
36 changed files
with
19,356 additions
and
14,727 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,64 @@ | ||
/* eslint-disable camelcase */ | ||
import React from 'react' | ||
import FlashMessage from 'react-native-flash-message' | ||
import React from "react"; | ||
import FlashMessage from "react-native-flash-message"; | ||
|
||
import { | ||
useFonts, | ||
Jost_400Regular, | ||
Jost_600SemiBold | ||
} from '@expo-google-fonts/jost' | ||
import AppLoading from 'expo-app-loading' | ||
import * as Notifications from 'expo-notifications' | ||
Jost_600SemiBold, | ||
} from "@expo-google-fonts/jost"; | ||
import * as SplashScreen from "expo-splash-screen"; | ||
import * as Notifications from "expo-notifications"; | ||
import * as NavigationBar from "expo-navigation-bar"; | ||
|
||
import { PlantProps } from './src/libs/storage' | ||
import Routes from './src/routes' | ||
import { Theme } from './src/theme' | ||
import { PlantData } from "./src/libs/storage"; | ||
import Routes from "./src/routes"; | ||
import { Theme } from "./src/theme"; | ||
import { StatusBar } from "expo-status-bar"; | ||
|
||
export default function App(): React.ReactElement { | ||
import { getStatusBarHeight } from 'react-native-iphone-x-helper' | ||
|
||
SplashScreen.preventAutoHideAsync(); | ||
NavigationBar.setBackgroundColorAsync("#fff"); | ||
|
||
export default function App(): React.ReactElement | null { | ||
const [fontsLoaded] = useFonts({ | ||
Jost_600SemiBold, | ||
Jost_400Regular | ||
}) | ||
Jost_400Regular, | ||
}); | ||
|
||
React.useEffect(() => { | ||
Notifications.setNotificationHandler({ | ||
handleNotification: async () => ({ | ||
shouldShowAlert: true, | ||
shouldPlaySound: false, | ||
shouldSetBadge: false | ||
}) | ||
}) | ||
|
||
shouldSetBadge: false, | ||
}), | ||
}); | ||
/* | ||
const subscription = Notifications.addNotificationReceivedListener( | ||
async notification => { | ||
const data = notification.request.content.data.plant as PlantProps | ||
console.log(data) | ||
async (notification) => { | ||
const content = notification.request.content | ||
console.log(content) | ||
} | ||
) | ||
); | ||
return () => subscription.remove(); | ||
*/ | ||
}, []); | ||
|
||
return () => subscription.remove() | ||
}, []) | ||
React.useEffect(() => { | ||
if (fontsLoaded) SplashScreen.hideAsync(); | ||
}, [fontsLoaded]); | ||
|
||
if (!fontsLoaded) { | ||
return <AppLoading /> | ||
return null; | ||
} | ||
return ( | ||
<Theme> | ||
<FlashMessage position="top" statusBarHeight={getStatusBarHeight()} /> | ||
<StatusBar style="dark" translucent /> | ||
<Routes /> | ||
<FlashMessage position="top" /> | ||
</Theme> | ||
) | ||
); | ||
} |
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,6 +1,6 @@ | ||
module.exports = function (api) { | ||
api.cache(true); | ||
return { | ||
presets: ['babel-preset-expo'] | ||
}; | ||
module.exports = function(api) { | ||
api.cache(true); | ||
return { | ||
presets: ['babel-preset-expo'], | ||
}; | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"cli": { | ||
"version": ">= 3.15.1" | ||
}, | ||
"build": { | ||
"development": { | ||
"developmentClient": true, | ||
"distribution": "internal" | ||
}, | ||
"preview": { | ||
"distribution": "internal" | ||
}, | ||
"production": {} | ||
}, | ||
"submit": { | ||
"production": {} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.