Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
API_URL=http://10.0.2.2:3000/api
IMAGE_BASE_URL=http://10.0.2.2:3000/fotos
REPORT_BASE_URL=http://10.0.2.2:3000/reports
RECAPTCHA_SITE_KEY=XXaaxxxxAAAxxxxAAAAAxxd343l
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
VITE_API_URL=http://localhost:3003/api
VITE_IMAGE_BASE_URL=http://localhost:3003/fotos
VITE_REPORT_BASE_URL=http://localhost:3003/reports
VITE_RECAPTCHA_SITE_KEY=XXaaxxxxAAAxxxxAAAAAxxd343l
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ yarn-error.log
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
!.yarn/versions
13 changes: 5 additions & 8 deletions android/app/src/main/java/com/herbarioapp/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
package com.herbarioapp

import android.os.Bundle
import com.facebook.react.ReactActivity
import com.facebook.react.ReactActivityDelegate
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
import com.facebook.react.defaults.DefaultReactActivityDelegate

class MainActivity : ReactActivity() {

/**
* Returns the name of the main component registered from JavaScript. This is used to schedule
* rendering of the component.
*/
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(null)
}

override fun getMainComponentName(): String = "HerbarioApp"

/**
* Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
* which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
*/
override fun createReactActivityDelegate(): ReactActivityDelegate =
DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
}
7 changes: 6 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
module.exports = {
presets: ['module:@react-native/babel-preset'],
plugins: [
'@babel/plugin-transform-export-namespace-from',
[
'babel-plugin-module-resolver', {
root: ['./src'],
alias: {
'@': './',
'@': './src',
},
}
],
['module:react-native-dotenv', {
moduleName: '@env',
path: '.env',
}]
],
};
Loading