Skip to content

Commit

Permalink
fixes and update expo version
Browse files Browse the repository at this point in the history
  • Loading branch information
gsbenevides2 committed Jul 14, 2023
1 parent 46adbd6 commit 993d5c0
Show file tree
Hide file tree
Showing 36 changed files with 19,356 additions and 14,727 deletions.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

37 changes: 0 additions & 37 deletions .eslintrc.json

This file was deleted.

4 changes: 0 additions & 4 deletions .expo-shared/assets.json

This file was deleted.

29 changes: 0 additions & 29 deletions .github/logo.svg

This file was deleted.

Binary file removed .github/plantmanager-preview.png
Binary file not shown.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules/
.expo/
dist/
npm-debug.*
*.jks
*.p8
Expand All @@ -11,3 +12,6 @@ web-build/

# macOS
.DS_Store

# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*
63 changes: 38 additions & 25 deletions App.tsx
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>
)
);
}
18 changes: 0 additions & 18 deletions LICENSE

This file was deleted.

24 changes: 18 additions & 6 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,42 @@
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
},
"android": {
"package": "com.gsbenevides.plantmanager",
"versionCode": 1,
"package": "com.gsbenevides.plantmanager",
"versionCode": 1,
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
"backgroundColor": "#ffffff"
}
},
"primaryColor": "#32B768",
"androidNavigationBar": {
"barStyle": "dark-content",
"backgroundColor": "#ffffff"
},
"androidStatusBar": {
"barStyle": "dark-content",
"backgroundColor": "#ffffff"
},
"web": {
"favicon": "./assets/favicon.png"
},
"extra": {
"eas": {
"projectId": "0f438039-7544-489e-b6b4-866bdf48778c"
}
}
}
}
10 changes: 5 additions & 5 deletions babel.config.js
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'],
};
};
5 changes: 0 additions & 5 deletions custom.d.ts

This file was deleted.

18 changes: 18 additions & 0 deletions eas.json
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": {}
}
}
15 changes: 0 additions & 15 deletions metro.config.js

This file was deleted.

Loading

0 comments on commit 993d5c0

Please sign in to comment.