Skip to content

Commit

Permalink
v1.2.0+120 - expo-sdk 49.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mariofix committed Jul 12, 2023
1 parent 06dc6f3 commit 20f4d57
Show file tree
Hide file tree
Showing 14 changed files with 930 additions and 2,092 deletions.
10 changes: 5 additions & 5 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
"name": "Ferias Libres",
"slug": "ferias-libres",
"description": "Ferias Libres de Chile",
"userInterfaceStyle": "light",
"userInterfaceStyle": "automatic",
"githubUrl": "https://github.com/mariofix/ferias-libres",
"orientation": "portrait",
"primaryColor": "#f9f7e8",
"assetBundlePatterns": [
"**/*"
],
Expand All @@ -17,13 +16,14 @@
"owner": "mariofix",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain"
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"icon": "./assets/icon.png",
"version": "1.1.5",
"version": "1.2.0",
"android": {
"package": "com.mariofix.feriaslibres",
"versionCode": 8,
"versionCode": 120,
"adaptiveIcon": {
"foregroundImage": "./assets/icon.png",
"backgroundColor": "#FFFFFF"
Expand Down
52 changes: 15 additions & 37 deletions app/_layout.js
Original file line number Diff line number Diff line change
@@ -1,44 +1,22 @@
import "react-native-gesture-handler";
import { Stack } from "expo-router/stack";
import { PaperProvider, Appbar, Menu } from "react-native-paper";
import { getHeaderTitle } from "@react-navigation/elements";
import { useState } from "react";
import { useLinkTo } from "@react-navigation/native";
import { SafeAreaProvider } from "react-native-safe-area-context";

const HeaderApp = ({ navigation, route, options, back }) => {
const title = getHeaderTitle(options, route.name);
const [visible, setVisible] = useState(false);
const linkTo = useLinkTo();
const openMenu = () => setVisible(true);
const closeMenu = () => setVisible(false);

return (
<Appbar.Header mode="small">
{back ? <Appbar.BackAction onPress={navigation.goBack} /> : null}
<Appbar.Content title={title} />
<Menu
visible={visible}
onDismiss={closeMenu}
anchor={<Appbar.Action icon="dots-vertical" onPress={openMenu} />}
>
<Menu.Item onPress={() => linkTo("/ayuda")} title="Sobre la App" />
</Menu>
</Appbar.Header>
);
};

export default function Layout() {
export default function MainLayout() {
return (
<PaperProvider>
<SafeAreaProvider>
<Stack
initialRouteName="index"
screenOptions={{
header: (props) => <HeaderApp {...props} />,
}}
/>
</SafeAreaProvider>
</PaperProvider>
<SafeAreaProvider>
<Stack
initialRouteName="index"
screenOptions={{
headerStyle: {
backgroundColor: "#f4511e",
},
headerTintColor: "#fff",
headerTitleStyle: {
fontWeight: "bold",
},
}}
></Stack>
</SafeAreaProvider>
);
}
4 changes: 2 additions & 2 deletions app/ayuda.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Stack } from "expo-router";
import { Stack } from "expo-router/stack";
import { StyleSheet, View, Linking } from "react-native";
import React from "react";
import { Text, Card, IconButton, Icon } from "react-native-paper";
import { Text, Card, IconButton, Icon } from "react-native";

const InformationPage = () => {
const handleOpenLink = (url) => {
Expand Down
8 changes: 4 additions & 4 deletions app/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { StyleSheet, View } from "react-native";
import { Stack } from "expo-router";
import ListaComunas from "../components/ListaComunas";
import { Stack } from "expo-router/stack";
import LayoutInicio from "../components/LayoutInicio";

export default function Page() {
export default function Index() {
return (
<View style={styles.container}>
<Stack.Screen options={{ title: "Ferias Libres" }} />
<ListaComunas />
<LayoutInicio />
</View>
);
}
Expand Down
256 changes: 0 additions & 256 deletions assets/nunoa.json

This file was deleted.

11 changes: 1 addition & 10 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@ module.exports = function (api) {
api.cache(true);
return {
presets: ["babel-preset-expo"],
plugins: [
"@babel/plugin-proposal-export-namespace-from",
"react-native-reanimated/plugin",
require.resolve("expo-router/babel"),
],
env: {
production: {
plugins: ["react-native-paper/babel"],
},
},
plugins: ["expo-router/babel", "react-native-reanimated/plugin"],
};
};
Loading

0 comments on commit 20f4d57

Please sign in to comment.