├── .github ├── pull_request_template.md └── workflows │ ├── build.yml │ └── submit.yml ├── .gitlab-ci.yml ├── CONTRIBUTING.md ├── README.md └── app ├── .dockerignore ├── .env-example ├── .eslintrc.js ├── .expo-shared └── assets.json ├── .gitignore ├── .lintstagedrc ├── .prettierrc.js ├── App.js ├── Dockerfile ├── app.config.js ├── app.json ├── assets ├── fonts │ ├── Montserrat │ │ ├── Montserrat-Bold.ttf │ │ ├── Montserrat-Light.ttf │ │ ├── Montserrat-Medium.ttf │ │ ├── Montserrat-Regular.ttf │ │ ├── Montserrat-SemiBold.ttf │ │ └── OFL.txt │ └── loadFonts.js ├── images │ ├── Seedling.svg │ ├── TutorialImages │ │ ├── Step1.svg │ │ ├── Step2.svg │ │ ├── Step3.svg │ │ ├── tela01.png │ │ ├── tela02.png │ │ ├── tela03.png │ │ └── tela04.png │ ├── back.png │ ├── blueCat.png │ ├── blueCatCard.svg │ ├── blueLogo.png │ ├── exclamation.svg │ ├── hand.svg │ ├── home.png │ ├── house.svg │ ├── logo.png │ ├── noImage.png │ ├── notFoundImage.svg │ ├── phone.svg │ ├── splash.png │ ├── whileLogo.png │ └── whiteCat.png └── styles │ ├── colorVariables.js │ ├── fontVariable.js │ ├── helpDescription.js │ └── mapstyle.js ├── babel.config.js ├── colors.js ├── docker-compose.yml ├── eas.json ├── metro.config.js ├── package.json ├── setup_env.sh ├── src ├── ExternalServices │ └── ViaCep.js ├── Navigation │ ├── AuthNavigation │ │ └── index.jsx │ ├── MainNavigation │ │ ├── GivenHelps │ │ │ └── index.jsx │ │ ├── MainNavigationStyles │ │ │ └── MainStackHeaderStyle.jsx │ │ ├── Routes │ │ │ ├── ActivitiesRoutes │ │ │ │ └── index.jsx │ │ │ ├── BadgeRoutes │ │ │ │ └── index.jsx │ │ │ ├── FeedbackRoutes │ │ │ │ └── index.jsx │ │ │ ├── MapRoutes │ │ │ │ └── index.jsx │ │ │ ├── MoreInfoRoutes │ │ │ │ └── index.jsx │ │ │ ├── ProfileRoutes │ │ │ │ └── index.jsx │ │ │ ├── SocialNetworkRoutes │ │ │ │ └── index.jsx │ │ │ ├── TimelineRoutes │ │ │ │ └── index.jsx │ │ │ └── index.jsx │ │ ├── index.jsx │ │ ├── options.js │ │ └── screenOptions.js │ └── index.jsx ├── components │ ├── Avatar │ │ ├── index.js │ │ └── styles.js │ ├── Container │ │ ├── index.js │ │ └── styles.js │ ├── CustomMap │ │ └── index.jsx │ ├── FAQModals │ │ ├── EmergencyNumbersModal │ │ │ └── index.jsx │ │ ├── modal.jsx │ │ └── styles.js │ ├── HistoricCard │ │ ├── index.js │ │ └── styles.js │ ├── LoadingIndicator │ │ ├── index.jsx │ │ └── styles.js │ ├── MyRequestCard │ │ ├── index.js │ │ ├── old.js │ │ └── styles.js │ ├── NoHelps │ │ ├── index.js │ │ └── styles.js │ ├── NotificationCard │ │ ├── index.js │ │ └── styles.js │ ├── PlusIconTextButton │ │ ├── index.js │ │ └── styles.js │ ├── SelectCategoryForm │ │ ├── index.js │ │ └── styles.js │ ├── UI │ │ ├── button │ │ │ ├── FilterButtons │ │ │ │ ├── index.js │ │ │ │ └── styles.js │ │ │ ├── index.js │ │ │ └── styles.js │ │ ├── input │ │ │ ├── index.js │ │ │ └── styles.js │ │ └── selectBox │ │ │ ├── index.js │ │ │ └── styles.js │ ├── UserItem │ │ └── index.jsx │ ├── atoms │ │ ├── ActivityFlatList │ │ │ └── index.jsx │ │ ├── Chips │ │ │ └── index.jsx │ │ ├── CircleBadge │ │ │ └── index.jsx │ │ ├── CircleIconButton │ │ │ └── index.jsx │ │ ├── DefaultButton │ │ │ └── index.jsx │ │ ├── Divider │ │ │ ├── index.jsx │ │ │ └── styles.js │ │ ├── IconButton │ │ │ ├── index.jsx │ │ │ └── styles.js │ │ ├── InformativeField │ │ │ └── index.jsx │ │ ├── Input │ │ │ └── index.jsx │ │ ├── RoundedFullButton │ │ │ └── index.jsx │ │ ├── SearchBar │ │ │ ├── index.jsx │ │ │ └── styles.js │ │ ├── SliderDescription │ │ │ └── index.jsx │ │ ├── SliderTitle │ │ │ └── index.jsx │ │ ├── TextButton │ │ │ └── index.jsx │ │ ├── TextSwitchButton │ │ │ └── index.jsx │ │ ├── UserProfileCard │ │ │ └── index.jsx │ │ └── ViewWithDivider │ │ │ └── index.jsx │ ├── modals │ │ ├── ActivityBottomSheet │ │ │ ├── EntityActivity.jsx │ │ │ ├── FilterActivity.jsx │ │ │ ├── UserActivity │ │ │ │ └── index.jsx │ │ │ └── index.jsx │ │ ├── BadgeEarnModal │ │ │ └── index.jsx │ │ ├── BaseBottomSheet │ │ │ └── index.jsx │ │ ├── BaseModal │ │ │ └── index.jsx │ │ ├── category │ │ │ ├── CategorySelector │ │ │ │ ├── index.js │ │ │ │ └── styles.js │ │ │ └── categoryDescription │ │ │ │ ├── index.js │ │ │ │ └── styles.js │ │ ├── conditionTermsModal │ │ │ ├── index.js │ │ │ └── style.js │ │ ├── expansiveModal │ │ │ └── index.jsx │ │ ├── newHelpModal │ │ │ ├── failure │ │ │ │ ├── index.js │ │ │ │ └── styles.js │ │ │ └── success │ │ │ │ ├── index.js │ │ │ │ └── styles.js │ │ └── privacyPolicyModal │ │ │ ├── index.js │ │ │ ├── privacy.js │ │ │ └── style.js │ ├── molecules │ │ ├── ActivityMarker │ │ │ └── index.jsx │ │ ├── Badge │ │ │ └── index.jsx │ │ ├── BadgeCard │ │ │ └── index.jsx │ │ ├── CategoriesList │ │ │ └── index.jsx │ │ ├── CustomDrawerItem │ │ │ ├── index.jsx │ │ │ └── styles.js │ │ ├── CustomHeader │ │ │ ├── index.jsx │ │ │ └── styles.js │ │ ├── DefaultButtonWithBagdes │ │ │ └── index.jsx │ │ ├── DescriptionBox │ │ │ └── index.jsx │ │ ├── Dialog │ │ │ └── index.jsx │ │ ├── FloatingIconButton │ │ │ └── index.jsx │ │ ├── FollowCount │ │ │ └── index.jsx │ │ ├── ProfilePhoto │ │ │ └── index.jsx │ │ ├── TextSwitch │ │ │ └── index.jsx │ │ ├── TimelineItem │ │ │ └── index.jsx │ │ ├── TutorialCard │ │ │ └── index.jsx │ │ ├── UserCard │ │ │ ├── index.jsx │ │ │ └── styles.js │ │ └── UserListItem │ │ │ ├── index.jsx │ │ │ └── styles.js │ ├── organisms │ │ ├── ActivitiesList │ │ │ └── index.jsx │ │ ├── ActivityCard │ │ │ └── index.jsx │ │ ├── AddressForm │ │ │ ├── constructor.js │ │ │ └── index.jsx │ │ ├── AnimatedMap │ │ │ └── index.jsx │ │ ├── BadgesList │ │ │ └── index.jsx │ │ ├── CustomDrawerList │ │ │ ├── index.jsx │ │ │ └── styles.js │ │ ├── DefaultCamera │ │ │ └── index.jsx │ │ ├── DefaultTimeline │ │ │ └── index.jsx │ │ ├── HorizontalList │ │ │ └── index.jsx │ │ ├── NotFound │ │ │ └── index.jsx │ │ ├── PersonalDataForm │ │ │ ├── constructor.js │ │ │ └── index.jsx │ │ └── SliderModal │ │ │ └── index.jsx │ ├── profileList │ │ ├── index.jsx │ │ └── styles.js │ └── templates │ │ ├── BordedScreenLayout │ │ └── index.jsx │ │ ├── CustomDrawerContent │ │ ├── index.jsx │ │ └── styles.js │ │ └── HelpScreenLayout │ │ └── index.jsx ├── config │ ├── authmiaajuda-firebase-example.json │ └── envVariables.js ├── docs │ ├── FAQ │ │ ├── EmergencyNumbers.js │ │ ├── HelpOfferedRecommendations.js │ │ ├── HelpRequestRecommendations.js │ │ ├── HowToBeVolunteer.js │ │ ├── HowToChooseHelpOffered.js │ │ ├── HowToCreateHelp.js │ │ ├── HowToOfferHelp.js │ │ └── faqOptions.jsx │ ├── filterMarkers.js │ ├── terms.js │ └── warning.js ├── images │ ├── catPhoto.png │ ├── logo.png │ └── logo.svg ├── index.js ├── pages │ ├── ActivitiesPages │ │ ├── History │ │ │ └── index.jsx │ │ ├── MyCampaigns │ │ │ └── index.jsx │ │ ├── MyOfferedHelp │ │ │ ├── MyOfferHelpDescription │ │ │ │ └── index.jsx │ │ │ └── index.jsx │ │ ├── MyRequestedHelp │ │ │ ├── MyRequestHelpDescription │ │ │ │ ├── FeedbackModal │ │ │ │ │ └── index.jsx │ │ │ │ └── index.jsx │ │ │ └── index.jsx │ │ ├── SelectedHelpOnMap │ │ │ └── index.jsx │ │ └── styles.js │ ├── AuthPages │ │ ├── Address │ │ │ ├── index.jsx │ │ │ └── styles.js │ │ ├── ConfirmRegister │ │ │ ├── index.jsx │ │ │ └── styles.js │ │ ├── ForgotPassword │ │ │ ├── index.jsx │ │ │ └── styles.js │ │ ├── InitialScreen │ │ │ ├── index.js │ │ │ └── styles.js │ │ ├── Location │ │ │ ├── index.jsx │ │ │ ├── styles.js │ │ │ └── texts.json │ │ ├── Login │ │ │ ├── index.jsx │ │ │ └── styles.js │ │ ├── PersonalData │ │ │ ├── index.jsx │ │ │ └── styles.js │ │ ├── Photo │ │ │ ├── index.jsx │ │ │ └── styles.js │ │ ├── RegistrationData │ │ │ ├── index.jsx │ │ │ └── styles.js │ │ └── RiskGroup │ │ │ ├── index.js │ │ │ └── styles.js │ ├── Badges │ │ └── index.jsx │ ├── EditProfile │ │ └── index.jsx │ ├── Feedback │ │ └── index.jsx │ ├── FindUsersPages │ │ ├── SocialNetworkProfile │ │ │ ├── index.jsx │ │ │ └── styles.js │ │ ├── index.jsx │ │ └── styles.js │ ├── HelpPages │ │ ├── CampaignDescription │ │ │ ├── index.jsx │ │ │ └── styles.js │ │ ├── CreateCampaign │ │ │ ├── index.jsx │ │ │ └── styles.js │ │ ├── CreateHelpOffer │ │ │ ├── index.jsx │ │ │ └── styles.js │ │ ├── CreateHelpRequest │ │ │ ├── index.jsx │ │ │ └── styles.js │ │ ├── HelpsOffered │ │ │ ├── HelpsFinished │ │ │ │ └── index.jsx │ │ │ └── OnGoingHelps │ │ │ │ └── index.jsx │ │ └── MyRequests │ │ │ ├── HelpsFinished │ │ │ └── index.jsx │ │ │ └── styles.js │ ├── InformationsCenter │ │ ├── index.jsx │ │ └── styles.js │ ├── IntroSlides │ │ ├── index.js │ │ └── styles.js │ ├── Main │ │ ├── MapScreen.jsx │ │ └── index.jsx │ ├── Notification │ │ ├── index.jsx │ │ └── styles.js │ ├── Splash │ │ ├── index.js │ │ └── styles.js │ ├── TimeLine │ │ └── index.jsx │ ├── UserList │ │ └── index.jsx │ └── UserProfile │ │ └── index.jsx ├── services │ ├── Activity.js │ ├── Api.js │ ├── Badge.js │ ├── Campaign.js │ ├── Category.js │ ├── Entity.js │ ├── Feedback.js │ ├── Firebase.js │ ├── Help.js │ ├── Notification.js │ ├── Session.js │ ├── Timeline.js │ ├── User.js │ ├── callService.js │ ├── socialNetworkProfile.js │ └── socket.js ├── store │ ├── actions.js │ ├── contexts │ │ ├── ScreenTemplateContext │ │ │ ├── index.jsx │ │ │ └── styles.jsx │ │ ├── activitiesContext.jsx │ │ ├── activityBottomSheetContext.jsx │ │ ├── badgeContext.jsx │ │ ├── categoryContext.jsx │ │ ├── cepContext.jsx │ │ ├── deviceInformationContext.js │ │ ├── feedbackContext.jsx │ │ ├── helpContext.js │ │ ├── loadingContext.jsx │ │ ├── socialNetworkProfileContext.jsx │ │ ├── timelineContext.jsx │ │ └── userContext.js │ └── reducers │ │ ├── helpReducer.js │ │ └── userReducer.js └── utils │ ├── Alert.js │ ├── ToastAndroid.js │ ├── callNumber.js │ ├── cnpjValidator.js │ ├── cpfValidator.js │ ├── createInteraction.js │ ├── dateValidator.js │ ├── emailValidator.js │ ├── formatCNPJ.js │ ├── formatCpf.js │ ├── formatDate.js │ ├── formatPhone.js │ ├── getActivityIcon.js │ ├── getPastTime.js │ ├── getScreenTitle.js │ ├── getSliderBody.jsx │ ├── getYearsSince.js │ ├── helpDistance.js │ ├── isAllEqual.js │ ├── isRecentDate.js │ ├── messageOperation.js │ ├── navigateToCreateFlow.js │ ├── navigateToDescription.js │ ├── navigateToMyActivity.js │ ├── openMaps.js │ ├── openWhatsapp.js │ ├── parseDate.js │ ├── passwordValidator.js │ ├── phoneValidator.js │ ├── removeSpecialChars.js │ ├── riskGroupsObject.js │ ├── shortenName.js │ ├── showDrawerButton.js │ ├── translateFirebaseAuthError.js │ ├── translatedActivities.js │ ├── verifyUserInfo.js │ └── warningPopUp.js ├── tailwind.config.js └── yarn.lock /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## Descrição 2 | 3 | Descrição concisa do que foi feito 4 | 5 | ## Resolve (Issues) 6 | 7 | Issues que foram resolvidas com o PR 8 | 9 | ## PRs relacionados, se houver 10 | 11 | branch | PR 12 | ------ | ------ 13 | outro_pr_relacionado | [link]() 14 | 15 | ## Tarefas gerais realizadas 16 | * Tarefa 1 17 | * Tarefa 2 18 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | --- 2 | image: patwoz/expo-cli:3 3 | 4 | cache: 5 | key: ${CI_COMMIT_REF_SLUG} 6 | paths: 7 | - node_modules/ 8 | 9 | stages: 10 | - publish 11 | - staging 12 | 13 | before_script: 14 | - cd app 15 | - cat $GOOGLE_CONFIG > .google-services.json 16 | - cat $FIREBASE_CONFIG_DEV > ./src/config/authmiaajuda-firebase-dev.json 17 | - cat $FIREBASE_CONFIG > ./src/config/authmiaajuda-firebase.json 18 | - yarn install --pure-lockfile --non-interactive 19 | 20 | publishing: 21 | stage: publish 22 | script: 23 | - chmod +x ./setup_env.sh 24 | - ./setup_env.sh 25 | - echo fs.inotify.max_user_watches=524288 | tee -a /etc/sysctl.conf && sysctl -p 26 | - expo login -u $EXPO_USERNAME -p $EXPO_PASSWORD 27 | - expo publish --release-channel prod --non-interactive 28 | only: 29 | - master 30 | 31 | staging: 32 | stage: staging 33 | script: 34 | - chmod +x ./setup_env.sh 35 | - ./setup_env.sh 36 | - echo fs.inotify.max_user_watches=524288 | tee -a /etc/sysctl.conf && sysctl -p 37 | - expo login -u $EXPO_USERNAME -p $EXPO_PASSWORD 38 | - expo publish --release-channel staging --non-interactive 39 | only: 40 | - develop 41 | -------------------------------------------------------------------------------- /app/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | -------------------------------------------------------------------------------- /app/.env-example: -------------------------------------------------------------------------------- 1 | IP_ADDRESS=Adicione Seu IPV4 Aqui 2 | MAPS_API_KEY= 3 | TURN_OFF_OFFER=false -------------------------------------------------------------------------------- /app/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | es6: true, 4 | node: true, 5 | jest: true, 6 | }, 7 | extends: [ 8 | 'eslint:recommended', 9 | 'plugin:react/recommended', 10 | 'prettier', 11 | 'eslint-config-prettier', 12 | ], 13 | parserOptions: { 14 | ecmaFeatures: { 15 | jsx: true, 16 | }, 17 | ecmaVersion: 11, 18 | sourceType: 'module', 19 | }, 20 | plugins: ['react', 'react-hooks', 'prettier'], 21 | rules: { 22 | quotes: ['error', 'single', { avoidEscape: true }], 23 | semi: ['error', 'always'], 24 | 'no-empty-function': 'off', 25 | 'react/display-name': 'off', 26 | 'react/prop-types': 'off', 27 | 'prettier/prettier': 'error', 28 | }, 29 | settings: { 30 | react: { 31 | version: 'detect', 32 | }, 33 | }, 34 | }; 35 | -------------------------------------------------------------------------------- /app/.expo-shared/assets.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/**/* 2 | .expo/* 3 | npm-debug.* 4 | *.jks 5 | *.p8 6 | *.p12 7 | *.key 8 | *.mobileprovision 9 | *.orig.* 10 | web-build/ 11 | web-report/ 12 | 13 | # macOS 14 | .DS_Store 15 | .env 16 | 17 | #webstorm 18 | .idea 19 | 20 | #auth json 21 | authmiaajuda-firebase.json 22 | authmiaajuda-firebase-dev.json 23 | google-services.json 24 | -------------------------------------------------------------------------------- /app/.lintstagedrc: -------------------------------------------------------------------------------- 1 | { 2 | "*.+(js|ts|tsx)": [ 3 | "eslint" 4 | ], 5 | "**/*.+(js|json|ts|tsx)": [ 6 | "prettier --write", 7 | "git add" 8 | ] 9 | } -------------------------------------------------------------------------------- /app/.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | singleQuote: true, 3 | trailingComma: 'all', 4 | printWidth: 80, 5 | tabWidth: 4, 6 | }; 7 | -------------------------------------------------------------------------------- /app/App.js: -------------------------------------------------------------------------------- 1 | import 'react-native-gesture-handler'; 2 | import React, { useEffect, useState } from 'react'; 3 | import Root from './src/index'; 4 | import loadFonts from './assets/fonts/loadFonts'; 5 | import { View, LogBox, AppRegistry } from 'react-native'; 6 | 7 | LogBox.ignoreLogs(['Unrecognized WebSocket']); 8 | 9 | AppRegistry.registerComponent('main', () => App); 10 | 11 | export default function App() { 12 | const [fontsLoaded, setFonts] = useState(false); 13 | useEffect(() => { 14 | async function loadFontsAsync() { 15 | await loadFonts(); 16 | setFonts(true); 17 | } 18 | loadFontsAsync(); 19 | }, []); 20 | 21 | if (!fontsLoaded) return ; 22 | 23 | return ; 24 | } 25 | -------------------------------------------------------------------------------- /app/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:14 2 | 3 | # Diretorio de trabalho 4 | WORKDIR /app 5 | 6 | # Docker guarda cache para cada instrução do dockerfile. 7 | # Colocar instruções mais mutáveis no final do arquivo para haver proveito do cache 8 | RUN yarn global add expo-cli 9 | 10 | 11 | COPY package.json /app/ 12 | 13 | RUN yarn install 14 | 15 | # Após instalação das dependências do package.json, é hora de instalar o expo que é onde o app é executado 16 | # Copiar todo o diretório para o diretório de trabalho do Docker 17 | # Definir a porta 19000 como porta de trabalho 18 | # Definir o comando yarn start para quando executarmos o comando "run" no container 19 | 20 | COPY . /app/ 21 | 22 | EXPOSE 19000 23 | 24 | 25 | ENV EXPO_DEVTOOLS_LISTEN_ADDRESS=0.0.0.0 26 | 27 | 28 | CMD REACT_NATIVE_PACKAGER_HOSTNAME=$IP_ADDRESS yarn start 29 | -------------------------------------------------------------------------------- /app/app.config.js: -------------------------------------------------------------------------------- 1 | 2 | const { MAPS_API_KEY } = process.env; 3 | 4 | export default ({ config }) => { 5 | return { 6 | ...config, 7 | android: { 8 | package: 'com.unb.miaajuda', 9 | permissions: [ 10 | 'ACCESS_COARSE_LOCATION', 11 | 'ACCESS_FINE_LOCATION', 12 | 'CAMERA', 13 | 'MANAGE_DOCUMENTS', 14 | 'READ_EXTERNAL_STORAGE', 15 | 'READ_PHONE_STATE', 16 | 'WRITE_EXTERNAL_STORAGE', 17 | ], 18 | googleServicesFile: './google-services.json', 19 | config: { 20 | googleMaps: { 21 | apiKey: MAPS_API_KEY, 22 | }, 23 | }, 24 | versionCode: 220, 25 | }, 26 | }; 27 | }; 28 | -------------------------------------------------------------------------------- /app/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "expo": { 3 | "name": "Mia Ajuda", 4 | "slug": "miaajuda", 5 | "privacy": "public", 6 | "platforms": ["android", "ios"], 7 | "notification": { 8 | "icon": "./assets/images/logo.png", 9 | "color": "#4b8ab9", 10 | "androidMode": "default" 11 | }, 12 | "version": "2.2.0 Mutt", 13 | "orientation": "portrait", 14 | "icon": "./assets/images/logo.png", 15 | "splash": { 16 | "image": "./assets/images/splash.png", 17 | "resizeMode": "contain", 18 | "backgroundColor": "#4b8ab9" 19 | }, 20 | "updates": { 21 | "fallbackToCacheTimeout": 0 22 | }, 23 | "assetBundlePatterns": ["**/*"], 24 | "ios": { 25 | "supportsTablet": true, 26 | "bundleIdentifier": "com.miaajuda.app" 27 | }, 28 | "packagerOpts": { 29 | "config": "metro.config.js", 30 | "sourceExts": [ 31 | "expo.ts", 32 | "expo.tsx", 33 | "expo.js", 34 | "expo.jsx", 35 | "ts", 36 | "tsx", 37 | "js", 38 | "jsx", 39 | "json", 40 | "wasm", 41 | "svg" 42 | ] 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /app/assets/fonts/Montserrat/Montserrat-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mia-ajuda/Frontend/6fabb891cd8c4edd07ee2f7c0d4f727803b59587/app/assets/fonts/Montserrat/Montserrat-Bold.ttf -------------------------------------------------------------------------------- /app/assets/fonts/Montserrat/Montserrat-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mia-ajuda/Frontend/6fabb891cd8c4edd07ee2f7c0d4f727803b59587/app/assets/fonts/Montserrat/Montserrat-Light.ttf -------------------------------------------------------------------------------- /app/assets/fonts/Montserrat/Montserrat-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mia-ajuda/Frontend/6fabb891cd8c4edd07ee2f7c0d4f727803b59587/app/assets/fonts/Montserrat/Montserrat-Medium.ttf -------------------------------------------------------------------------------- /app/assets/fonts/Montserrat/Montserrat-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mia-ajuda/Frontend/6fabb891cd8c4edd07ee2f7c0d4f727803b59587/app/assets/fonts/Montserrat/Montserrat-Regular.ttf -------------------------------------------------------------------------------- /app/assets/fonts/Montserrat/Montserrat-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mia-ajuda/Frontend/6fabb891cd8c4edd07ee2f7c0d4f727803b59587/app/assets/fonts/Montserrat/Montserrat-SemiBold.ttf -------------------------------------------------------------------------------- /app/assets/fonts/loadFonts.js: -------------------------------------------------------------------------------- 1 | import * as Font from 'expo-font'; 2 | 3 | export default async function loadFonts() { 4 | return Font.loadAsync({ 5 | 'montserrat-light': require('../fonts/Montserrat/Montserrat-Light.ttf'), 6 | 'montserrat-regular': require('../fonts/Montserrat/Montserrat-Regular.ttf'), 7 | 'montserrat-medium': require('../fonts/Montserrat/Montserrat-Medium.ttf'), 8 | 'montserrat-semibold': require('../fonts/Montserrat/Montserrat-SemiBold.ttf'), 9 | 'montserrat-bold': require('../fonts/Montserrat/Montserrat-Bold.ttf'), 10 | }); 11 | } 12 | -------------------------------------------------------------------------------- /app/assets/images/Seedling.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/assets/images/TutorialImages/tela01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mia-ajuda/Frontend/6fabb891cd8c4edd07ee2f7c0d4f727803b59587/app/assets/images/TutorialImages/tela01.png -------------------------------------------------------------------------------- /app/assets/images/TutorialImages/tela02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mia-ajuda/Frontend/6fabb891cd8c4edd07ee2f7c0d4f727803b59587/app/assets/images/TutorialImages/tela02.png -------------------------------------------------------------------------------- /app/assets/images/TutorialImages/tela03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mia-ajuda/Frontend/6fabb891cd8c4edd07ee2f7c0d4f727803b59587/app/assets/images/TutorialImages/tela03.png -------------------------------------------------------------------------------- /app/assets/images/TutorialImages/tela04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mia-ajuda/Frontend/6fabb891cd8c4edd07ee2f7c0d4f727803b59587/app/assets/images/TutorialImages/tela04.png -------------------------------------------------------------------------------- /app/assets/images/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mia-ajuda/Frontend/6fabb891cd8c4edd07ee2f7c0d4f727803b59587/app/assets/images/back.png -------------------------------------------------------------------------------- /app/assets/images/blueCat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mia-ajuda/Frontend/6fabb891cd8c4edd07ee2f7c0d4f727803b59587/app/assets/images/blueCat.png -------------------------------------------------------------------------------- /app/assets/images/blueCatCard.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/assets/images/blueLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mia-ajuda/Frontend/6fabb891cd8c4edd07ee2f7c0d4f727803b59587/app/assets/images/blueLogo.png -------------------------------------------------------------------------------- /app/assets/images/exclamation.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/assets/images/hand.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/assets/images/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mia-ajuda/Frontend/6fabb891cd8c4edd07ee2f7c0d4f727803b59587/app/assets/images/home.png -------------------------------------------------------------------------------- /app/assets/images/house.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mia-ajuda/Frontend/6fabb891cd8c4edd07ee2f7c0d4f727803b59587/app/assets/images/logo.png -------------------------------------------------------------------------------- /app/assets/images/noImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mia-ajuda/Frontend/6fabb891cd8c4edd07ee2f7c0d4f727803b59587/app/assets/images/noImage.png -------------------------------------------------------------------------------- /app/assets/images/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mia-ajuda/Frontend/6fabb891cd8c4edd07ee2f7c0d4f727803b59587/app/assets/images/splash.png -------------------------------------------------------------------------------- /app/assets/images/whileLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mia-ajuda/Frontend/6fabb891cd8c4edd07ee2f7c0d4f727803b59587/app/assets/images/whileLogo.png -------------------------------------------------------------------------------- /app/assets/images/whiteCat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mia-ajuda/Frontend/6fabb891cd8c4edd07ee2f7c0d4f727803b59587/app/assets/images/whiteCat.png -------------------------------------------------------------------------------- /app/assets/styles/colorVariables.js: -------------------------------------------------------------------------------- 1 | const colors = { 2 | primary: '#4b8ab9', 3 | 'primary-400': 'rgba(75, 138, 185, 0.4)', 4 | primaryContrast: '#81b0ff', 5 | primaryLowOpacity: '#E4F4FF', 6 | secondary: '#f7ef6e', 7 | danger: '#e47171', 8 | 'danger-400': 'rgba(228, 113, 113, 0.4)', 9 | dark: '#353535', 10 | light: '#f7f7f7', 11 | success: '#77dd77', 12 | }; 13 | 14 | export default colors; 15 | -------------------------------------------------------------------------------- /app/assets/styles/fontVariable.js: -------------------------------------------------------------------------------- 1 | import colors from './colorVariables'; 2 | import { RFValue } from 'react-native-responsive-fontsize'; 3 | 4 | const minimumTextSize = 14; 5 | const fontFamily = 'montserrat-regular'; 6 | const defaultProps = { 7 | color: colors.dark, 8 | fontFamily: fontFamily, 9 | }; 10 | 11 | const fonts = { 12 | title: { 13 | ...defaultProps, 14 | fontSize: RFValue(minimumTextSize * 1.5, 640), 15 | }, 16 | subtitle: { 17 | ...defaultProps, 18 | fontSize: RFValue(minimumTextSize * 1.2, 640), 19 | }, 20 | body: { 21 | ...defaultProps, 22 | fontSize: RFValue(minimumTextSize, 640), 23 | }, 24 | 25 | small: { 26 | ...defaultProps, 27 | fontSize: RFValue(minimumTextSize * 0.75, 640), 28 | }, 29 | }; 30 | 31 | export default fonts; 32 | -------------------------------------------------------------------------------- /app/assets/styles/mapstyle.js: -------------------------------------------------------------------------------- 1 | const mapStyleNight = [ 2 | { 3 | elementType: 'geometry', 4 | stylers: [ 5 | { 6 | color: '#1d2c4d', 7 | }, 8 | ], 9 | }, 10 | { 11 | elementType: 'labels.text.fill', 12 | stylers: [ 13 | { 14 | color: '#8ec3b9', 15 | }, 16 | ], 17 | }, 18 | { 19 | elementType: 'labels.text.stroke', 20 | stylers: [ 21 | { 22 | color: '#1a3646', 23 | }, 24 | ], 25 | }, 26 | { 27 | featureType: 'administrative.country', 28 | elementType: 'geometry.stroke', 29 | stylers: [ 30 | { 31 | color: '#4b6878', 32 | }, 33 | ], 34 | }, 35 | ]; 36 | 37 | const mapStyleDay = [ 38 | { 39 | featureType: 'administrative.land_parcel', 40 | elementType: 'labels', 41 | stylers: [ 42 | { 43 | visibility: 'off', 44 | }, 45 | ], 46 | }, 47 | { 48 | featureType: 'poi', 49 | elementType: 'labels.text', 50 | stylers: [ 51 | { 52 | visibility: 'off', 53 | }, 54 | ], 55 | }, 56 | { 57 | featureType: 'poi.business', 58 | stylers: [ 59 | { 60 | visibility: 'off', 61 | }, 62 | ], 63 | }, 64 | ]; 65 | 66 | export default { 67 | night: { 68 | map: mapStyleNight, 69 | }, 70 | day: { 71 | map: mapStyleDay, 72 | }, 73 | }; 74 | -------------------------------------------------------------------------------- /app/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = function (api) { 2 | api.cache(true); 3 | return { 4 | presets: ['babel-preset-expo'], 5 | plugins: ['react-native-reanimated/plugin', 'nativewind/babel', ["module:react-native-dotenv", { 6 | "envName": "APP_ENV", 7 | "moduleName": "@env", 8 | "path": ".env", 9 | "blocklist": null, 10 | "allowlist": null, 11 | "blacklist": null, 12 | "whitelist": null, 13 | "safe": false, 14 | "allowUndefined": true, 15 | "verbose": false 16 | }]], 17 | }; 18 | }; 19 | -------------------------------------------------------------------------------- /app/colors.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | primary: { 3 | DEFAULT: 'rgba(75, 138, 185, 1)', 4 | 100: 'rgba(75, 138, 185, 0.1)', 5 | 200: 'rgba(75, 138, 185, 0.2)', 6 | 300: 'rgba(75, 138, 185, 0.3)', 7 | 400: 'rgba(75, 138, 185, 0.4)', 8 | 500: 'rgba(75, 138, 185, 0.5)', 9 | 600: 'rgba(75, 138, 185, 0.6)', 10 | 700: 'rgba(75, 138, 185, 0.7)', 11 | 800: 'rgba(75, 138, 185, 0.8)', 12 | 900: 'rgba(75, 138, 185, 0.9)', 13 | contrast: '#81b0ff', 14 | darker: '#182C3B', 15 | }, 16 | secondary: { 17 | DEFAULT: '#f7ef6e', 18 | 500: '#FAD980', 19 | }, 20 | danger: { 21 | DEFAULT: 'rgba(228, 113, 113, 1)', 22 | 100: 'rgba(228, 113, 113, 0.1)', 23 | 200: 'rgba(228, 113, 113, 0.2)', 24 | 300: 'rgba(228, 113, 113, 0.3)', 25 | darker: '#681111', 26 | }, 27 | black: { 28 | DEFAULT: 'rgba(53,53,53,1)', 29 | 100: 'rgba(53,53,53,0.1)', 30 | 200: 'rgba(53,53,53,0.2)', 31 | 300: 'rgba(53,53,53,0.3)', 32 | 400: 'rgba(53,53,53,0.4)', 33 | 500: 'rgba(53,53,53,0.5)', 34 | 600: 'rgba(53,53,53,0.6)', 35 | 700: 'rgba(53,53,53,0.7)', 36 | 800: 'rgba(53,53,53,0.8)', 37 | 900: 'rgba(53,53,53,0.9)', 38 | }, 39 | light: '#f7f7f7', 40 | success: '#77dd77', 41 | background: '#f1f1f1', 42 | new_background: '#F2F2F7', 43 | gray: { 44 | DEFAULT: '#e6e6e6', 45 | contrast: '#D2D2D2', 46 | }, 47 | 'first-rank': '#BF6159', 48 | 'second-rank': '#538D95', 49 | 'thirt-rank': '#D0A408', 50 | }; 51 | -------------------------------------------------------------------------------- /app/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.7' 2 | services: 3 | miajuda-expo: 4 | container_name: miajuda_FrontEnd 5 | build: 6 | context: . 7 | dockerfile: Dockerfile 8 | stdin_open: true 9 | tty: true 10 | env_file: 11 | - '.env' 12 | ports: 13 | - '19000:19000' 14 | - '19001:19001' 15 | - '19002:19002' 16 | volumes: 17 | - '.:/app' 18 | - './package.json:/app/package.json' 19 | - './package-lock.json:/app/package-lock.json' 20 | - 'notused:/app/node_modules' 21 | environment: 22 | - NODE_ENV=development 23 | volumes: 24 | notused: 25 | -------------------------------------------------------------------------------- /app/eas.json: -------------------------------------------------------------------------------- 1 | { 2 | "cli": { 3 | "version": ">= 0.57.0" 4 | }, 5 | "submit": { 6 | "production": { 7 | "android": { 8 | "serviceAccountKeyPath": "./serviceAccountKey.json", 9 | "track": "production" 10 | } 11 | }, 12 | "alpha_test": { 13 | "android": { 14 | "serviceAccountKeyPath": "./serviceAccountKey.json", 15 | "track": "alpha" 16 | } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/metro.config.js: -------------------------------------------------------------------------------- 1 | const { getDefaultConfig } = require('expo/metro-config'); 2 | 3 | const config = getDefaultConfig(__dirname); 4 | 5 | config.transformer.babelTransformerPath = require.resolve( 6 | 'react-native-svg-transformer', 7 | ); 8 | 9 | config.resolver.assetExts = config.resolver.assetExts.filter( 10 | (ext) => ext !== 'svg', 11 | ); 12 | config.resolver.sourceExts = [...config.resolver.sourceExts, 'svg']; 13 | 14 | module.exports = config; 15 | -------------------------------------------------------------------------------- /app/setup_env.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo IP_ADDRESS=$IP_ADDRESS >> .env 4 | echo MAPS_API_KEY=$MAPS_API_KEY >> .env -------------------------------------------------------------------------------- /app/src/ExternalServices/ViaCep.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | class Viacep { 3 | async getCepInformation(currentCep) { 4 | const url = `https://viacep.com.br/ws/${currentCep}/json/`; 5 | const cepInformation = await axios.get(url); 6 | if (cepInformation.data.erro) throw new Error('cep inválido'); 7 | return cepInformation.data; 8 | } 9 | } 10 | 11 | export default new Viacep(); 12 | -------------------------------------------------------------------------------- /app/src/Navigation/AuthNavigation/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { createStackNavigator } from '@react-navigation/stack'; 3 | import Login from '../../pages/AuthPages/Login'; 4 | import RegistrationData from '../../pages/AuthPages/RegistrationData'; 5 | import PersonalData from '../../pages/AuthPages/PersonalData'; 6 | import RiskGroup from '../../pages/AuthPages/RiskGroup'; 7 | import ForgotPassword from '../../pages/AuthPages/ForgotPassword'; 8 | import InitialScreen from '../../pages/AuthPages/InitialScreen'; 9 | import Location from '../../pages/AuthPages/Location'; 10 | import ConfirmRegister from '../../pages/AuthPages/ConfirmRegister'; 11 | 12 | const Stack = createStackNavigator(); 13 | const AuthRoutes = () => { 14 | return ( 15 | 21 | 22 | 23 | 24 | 28 | 29 | 30 | 31 | 32 | 33 | ); 34 | }; 35 | export default AuthRoutes; 36 | -------------------------------------------------------------------------------- /app/src/Navigation/MainNavigation/GivenHelps/index.jsx: -------------------------------------------------------------------------------- 1 | import React, { useContext } from 'react'; 2 | import { createMaterialTopTabNavigator } from '@react-navigation/material-top-tabs'; 3 | import History from '../../../pages/ActivitiesPages/History'; 4 | import myOfferedHelp from '../../../pages/ActivitiesPages/MyOfferedHelp'; 5 | import myRequestedHelp from '../../../pages/ActivitiesPages/MyRequestedHelp'; 6 | import { UserContext } from '../../../store/contexts/userContext'; 7 | import myCampaigns from '../../../pages/ActivitiesPages/MyCampaigns'; 8 | import { screenOptions } from '../screenOptions'; 9 | 10 | const TopTab = createMaterialTopTabNavigator(); 11 | export const NavigationGivenHelps = () => { 12 | const { isEntity } = useContext(UserContext); 13 | return ( 14 | 18 | {isEntity ? OngGivenHelps() : UserGivenHelps()} 19 | 20 | 21 | ); 22 | }; 23 | 24 | const OngGivenHelps = () => ( 25 | 26 | ); 27 | 28 | const UserGivenHelps = () => ( 29 | <> 30 | 31 | 32 | 33 | ); 34 | -------------------------------------------------------------------------------- /app/src/Navigation/MainNavigation/MainNavigationStyles/MainStackHeaderStyle.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { CustomHeader } from '../../../components/molecules/CustomHeader'; 3 | import { getScreenTtile } from '../../../utils/getScreenTitle'; 4 | 5 | const headerStyle = ({ 6 | navigation, 7 | route, 8 | iconType = 'drawer', 9 | buttonProps, 10 | hasTitle = true, 11 | }) => { 12 | return { 13 | header: () => ( 14 | 20 | ), 21 | }; 22 | }; 23 | 24 | export default headerStyle; 25 | -------------------------------------------------------------------------------- /app/src/Navigation/MainNavigation/Routes/BadgeRoutes/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { createStackNavigator } from '@react-navigation/stack'; 3 | import { Badges } from '../../../../pages/Badges'; 4 | 5 | const Stack = createStackNavigator(); 6 | 7 | export const BadgeRoutes = () => { 8 | return ( 9 | <> 10 | 11 | 12 | ); 13 | }; 14 | -------------------------------------------------------------------------------- /app/src/Navigation/MainNavigation/Routes/FeedbackRoutes/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { createStackNavigator } from '@react-navigation/stack'; 3 | import { FeedbackScreen } from '../../../../pages/Feedback'; 4 | import headerStyle from '../../MainNavigationStyles/MainStackHeaderStyle'; 5 | 6 | const Stack = createStackNavigator(); 7 | 8 | export const FeedbackRoutes = () => { 9 | return ( 10 | <> 11 | 16 | 17 | ); 18 | }; 19 | -------------------------------------------------------------------------------- /app/src/Navigation/MainNavigation/Routes/MapRoutes/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { createStackNavigator } from '@react-navigation/stack'; 3 | import Main from '../../../../pages/Main'; 4 | import headerStyle from '../../MainNavigationStyles/MainStackHeaderStyle'; 5 | import MapScreen from '../../../../pages/Main/MapScreen'; 6 | 7 | const Stack = createStackNavigator(); 8 | 9 | export const MapRoutes = () => { 10 | return ( 11 | <> 12 | 13 | 18 | 19 | ); 20 | }; 21 | -------------------------------------------------------------------------------- /app/src/Navigation/MainNavigation/Routes/MoreInfoRoutes/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { createStackNavigator } from '@react-navigation/stack'; 3 | import Location from '../../../../pages/AuthPages/Location'; 4 | import Photo from '../../../../pages/AuthPages/Photo'; 5 | import Address from '../../../../pages/AuthPages/Address'; 6 | const Stack = createStackNavigator(); 7 | 8 | export const MoreInfoRoutes = () => { 9 | return ( 10 | <> 11 | 16 | 17 | 18 | 19 | ); 20 | }; 21 | -------------------------------------------------------------------------------- /app/src/Navigation/MainNavigation/Routes/ProfileRoutes/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { createStackNavigator } from '@react-navigation/stack'; 3 | import headerStyle from '../../MainNavigationStyles/MainStackHeaderStyle'; 4 | import { UserProfile } from '../../../../pages/UserProfile'; 5 | import { EditProfile } from '../../../../pages/EditProfile'; 6 | 7 | const Stack = createStackNavigator(); 8 | 9 | export const ProfileRoutes = () => { 10 | return ( 11 | <> 12 | { 16 | return headerStyle({ 17 | ...props, 18 | iconType: 'drawer', 19 | buttonProps: { 20 | visible: true, 21 | text: 'Editar perfil', 22 | onPress: () => 23 | props.navigation.navigate('editProfile'), 24 | }, 25 | }); 26 | }} 27 | /> 28 | 29 | 30 | ); 31 | }; 32 | -------------------------------------------------------------------------------- /app/src/Navigation/MainNavigation/Routes/TimelineRoutes/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { createStackNavigator } from '@react-navigation/stack'; 3 | import { Timeline } from '../../../../pages/TimeLine'; 4 | import headerStyle from '../../MainNavigationStyles/MainStackHeaderStyle'; 5 | 6 | const Stack = createStackNavigator(); 7 | 8 | export const TimelineRoutes = () => { 9 | return ( 10 | <> 11 | 16 | 17 | ); 18 | }; 19 | -------------------------------------------------------------------------------- /app/src/Navigation/MainNavigation/Routes/index.jsx: -------------------------------------------------------------------------------- 1 | import React, { Fragment } from 'react'; 2 | import { createStackNavigator } from '@react-navigation/stack'; 3 | import headerStyle from '../MainNavigationStyles/MainStackHeaderStyle'; 4 | import NotificationPage from '../../../pages/Notification/index'; 5 | import { ProfileRoutes } from './ProfileRoutes'; 6 | import { SocialNetworkRoutes } from './SocialNetworkRoutes'; 7 | import { ActivitiesRoutes } from './ActivitiesRoutes'; 8 | import { MoreInfoRoutes } from './MoreInfoRoutes'; 9 | import { MapRoutes } from './MapRoutes'; 10 | import { BadgeRoutes } from './BadgeRoutes'; 11 | import { FeedbackRoutes } from './FeedbackRoutes'; 12 | import { TimelineRoutes } from './TimelineRoutes'; 13 | 14 | const Stack = createStackNavigator(); 15 | 16 | const othersRoutes = [ 17 | MapRoutes, 18 | MoreInfoRoutes, 19 | ActivitiesRoutes, 20 | ProfileRoutes, 21 | SocialNetworkRoutes, 22 | TimelineRoutes, 23 | BadgeRoutes, 24 | FeedbackRoutes, 25 | ]; 26 | 27 | const Routes = ({ initialRouteName }) => ( 28 | headerStyle({ ...props, iconType: 'back' })} 31 | > 32 | 37 | {othersRoutes.map((routes, i) => ( 38 | {routes()} 39 | ))} 40 | 41 | ); 42 | 43 | export default Routes; 44 | -------------------------------------------------------------------------------- /app/src/Navigation/MainNavigation/options.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Icon } from 'react-native-elements'; 3 | import { RFValue } from 'react-native-responsive-fontsize'; 4 | import colors from '../../../assets/styles/colorVariables'; 5 | 6 | export const drawerNavigationOptions = { 7 | headerStyle: { 8 | backgroundColor: colors.primary, 9 | }, 10 | headerTintColor: colors.light, 11 | 12 | drawerActiveTintColor: colors.dark, 13 | drawerInactiveTintColor: colors.dark, 14 | drawerLabelStyle: { 15 | fontFamily: 'montserrat-regular', 16 | fontSize: RFValue(16, 640), 17 | }, 18 | drawerActiveBackgroundColor: colors.primaryLowOpacity, 19 | }; 20 | 21 | export const drawerScreenOptions = (screenName, icon, family = 'material') => { 22 | return { 23 | headerTitle: screenName, 24 | title: screenName, 25 | headerShown: false, 26 | drawerIcon: () => ( 27 | 33 | ), 34 | }; 35 | }; 36 | -------------------------------------------------------------------------------- /app/src/Navigation/MainNavigation/screenOptions.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Dimensions, Text } from 'react-native'; 3 | import colors from '../../../colors'; 4 | import fonts from '../../../assets/styles/fontVariable'; 5 | import { RFValue } from 'react-native-responsive-fontsize'; 6 | 7 | export const screenOptions = ({ route }) => { 8 | const renderTabText = (text, style) => {text}; 9 | 10 | return { 11 | tabBarLabel: ({ focused }) => { 12 | const commonStyle = { 13 | ...fonts.body, 14 | color: colors.dark, 15 | fontSize: RFValue(14, 640), 16 | width: Dimensions.get('screen').width * 0.3, 17 | textAlign: 'center', 18 | }; 19 | const style = focused 20 | ? { 21 | ...commonStyle, 22 | fontFamily: 'montserrat-bold', 23 | } 24 | : commonStyle; 25 | return renderTabText(route.name, style); 26 | }, 27 | tabBarStyle: { 28 | backgroundColor: 'transparent', 29 | shadowColor: 'transparent', 30 | borderBottomWidth: 1, 31 | borderColor: '#BCCBCA', 32 | paddingHorizontal: 8, 33 | }, 34 | tabBarIndicatorStyle: { 35 | backgroundColor: colors.primary.DEFAULT, 36 | borderRadius: 16, 37 | padding: 1, 38 | }, 39 | }; 40 | }; 41 | -------------------------------------------------------------------------------- /app/src/Navigation/index.jsx: -------------------------------------------------------------------------------- 1 | import React, { useContext } from 'react'; 2 | import AuthRoutes from './AuthNavigation'; 3 | import { NavigationContainer } from '@react-navigation/native'; 4 | import { UserContext } from '../store/contexts/userContext'; 5 | import Splash from '../pages/Splash'; 6 | import { MainNavigation } from './MainNavigation'; 7 | import { ActivitiesContext } from '../store/contexts/activitiesContext'; 8 | 9 | const Routes = () => { 10 | const { user } = useContext(UserContext); 11 | const { loadingActivities } = useContext(ActivitiesContext); 12 | const isLoadingUserInformation = user && user.showSplash; 13 | const isUserAuthenticated = user._id; 14 | 15 | if (isLoadingUserInformation) { 16 | return ; 17 | } else if (isUserAuthenticated && loadingActivities) { 18 | return ; 19 | } 20 | 21 | return ( 22 | 23 | {isUserAuthenticated ? : } 24 | 25 | ); 26 | }; 27 | 28 | export default Routes; 29 | -------------------------------------------------------------------------------- /app/src/components/Avatar/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { View } from 'react-native'; 3 | import { Icon } from 'react-native-elements'; 4 | import colors from '../../../assets/styles/colorVariables'; 5 | import styles from './styles'; 6 | 7 | export default function Avatar({ isRiskGroup, iconType }) { 8 | const iconColor = isRiskGroup ? colors.danger : colors.primary; 9 | 10 | return ( 11 | 12 | 18 | 19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /app/src/components/Avatar/styles.js: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native'; 2 | 3 | const styles = StyleSheet.create({ 4 | container: { 5 | width: 40, 6 | height: 40, 7 | backgroundColor: '#fff', 8 | borderRadius: 25, 9 | transform: [{ rotate: '-10deg' }], 10 | }, 11 | }); 12 | 13 | export default styles; 14 | -------------------------------------------------------------------------------- /app/src/components/Container/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { View } from 'react-native'; 3 | import styles from './styles'; 4 | 5 | export default function Container(props) { 6 | return {props.children}; 7 | } 8 | -------------------------------------------------------------------------------- /app/src/components/Container/styles.js: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native'; 2 | 3 | const styles = StyleSheet.create({ 4 | container: { 5 | margin: 16, 6 | height: '100%', 7 | }, 8 | }); 9 | 10 | export default styles; 11 | -------------------------------------------------------------------------------- /app/src/components/CustomMap/index.jsx: -------------------------------------------------------------------------------- 1 | import React, { useCallback, useRef } from 'react'; 2 | import MapView from 'react-native-maps'; 3 | import mapstyle from '../../../assets/styles/mapstyle'; 4 | import { useFocusEffect } from '@react-navigation/native'; 5 | 6 | export default function CustomMap({ 7 | children, 8 | initialRegion, 9 | animateToRegion, 10 | showsMyLocationButton = true, 11 | }) { 12 | const mapRef = useRef(null); 13 | 14 | useFocusEffect( 15 | useCallback(() => { 16 | if (animateToRegion) { 17 | mapRef.current.animateToRegion(animateToRegion, 700); 18 | } 19 | }, [animateToRegion]), 20 | ); 21 | 22 | return ( 23 | 33 | {children} 34 | 35 | ); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/components/FAQModals/EmergencyNumbersModal/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import emergencyNumbers from '../../../docs/FAQ/EmergencyNumbers'; 3 | import { ModalComponent } from '../modal'; 4 | 5 | export default function EmergencyNumbers({ visible, setVisible }) { 6 | // TODO: replace it later with a new modal 7 | return ( 8 | 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /app/src/components/FAQModals/modal.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Modal, ScrollView, Text, View } from 'react-native'; 3 | import styles from './styles'; 4 | import { FloatingIconButton } from '../molecules/FloatingIconButton'; 5 | 6 | export const ModalComponent = (props) => { 7 | return ( 8 | props.setVisible(false)} 12 | animationType="fade" 13 | > 14 | 15 | 16 | { 19 | props.setVisible(false); 20 | }} 21 | /> 22 | 23 | {props.list.map((numbers) => { 24 | return ( 25 | 26 | 27 | {' '} 28 | {numbers.number}{' '} 29 | 30 | 31 | {' '} 32 | {numbers.description}{' '} 33 | 34 | 35 | ); 36 | })} 37 | 38 | 39 | 40 | 41 | ); 42 | }; 43 | -------------------------------------------------------------------------------- /app/src/components/FAQModals/styles.js: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native'; 2 | import colors from '../../../assets/styles/colorVariables'; 3 | 4 | const minimumTextSize = 16; 5 | 6 | const styles = StyleSheet.create({ 7 | modalContainer: { 8 | width: '100%', 9 | height: '100%', 10 | backgroundColor: 'rgba(0,0,0,0.3)', 11 | }, 12 | 13 | modalContent: { 14 | paddingTop: 50, 15 | backgroundColor: colors.light, 16 | padding: 20, 17 | marginBottom: 50, 18 | borderRadius: 20, 19 | top: '2.5%', 20 | }, 21 | 22 | title: { 23 | alignSelf: 'center', 24 | marginBottom: 10, 25 | fontFamily: 'montserrat-semibold', 26 | color: colors.primary, 27 | fontSize: minimumTextSize * 1.5, 28 | }, 29 | 30 | description: { 31 | alignSelf: 'center', 32 | marginBottom: 10, 33 | fontFamily: 'montserrat-semibold', 34 | color: colors.primary, 35 | fontSize: minimumTextSize, 36 | }, 37 | 38 | icon: { 39 | top: '5.5%', 40 | right: 20, 41 | position: 'absolute', 42 | zIndex: 5, 43 | }, 44 | }); 45 | 46 | export default styles; 47 | -------------------------------------------------------------------------------- /app/src/components/HistoricCard/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { View, Text } from 'react-native'; 3 | import styles from './styles'; 4 | export default function HistoricCard({ object, isRiskGroup, children }) { 5 | return ( 6 | 13 | 14 | 15 | {object.title} 16 | 17 | 18 | 19 | 20 | {object.description} 21 | 22 | 23 | 24 | {object.categories.map((category) => ( 25 | 29 | 30 | {category.name} 31 | 32 | 33 | ))} 34 | 35 | 36 | 37 | {children} 38 | 39 | ); 40 | } 41 | -------------------------------------------------------------------------------- /app/src/components/LoadingIndicator/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { ActivityIndicator, View } from 'react-native'; 3 | import colors from '../../../assets/styles/colorVariables'; 4 | import styles from './styles'; 5 | 6 | export const LoadingIndicator = () => { 7 | return ( 8 | 9 | 10 | 11 | ); 12 | }; 13 | -------------------------------------------------------------------------------- /app/src/components/LoadingIndicator/styles.js: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native'; 2 | 3 | const styles = StyleSheet.create({ 4 | loadingContainer: { 5 | position: 'absolute', 6 | alignItems: 'center', 7 | justifyContent: 'center', 8 | width: '100%', 9 | height: '100%', 10 | zIndex: 1, 11 | backgroundColor: 'rgba(52, 52, 52, 0.3)', 12 | }, 13 | }); 14 | 15 | export default styles; 16 | -------------------------------------------------------------------------------- /app/src/components/MyRequestCard/old.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mia-ajuda/Frontend/6fabb891cd8c4edd07ee2f7c0d4f727803b59587/app/src/components/MyRequestCard/old.js -------------------------------------------------------------------------------- /app/src/components/MyRequestCard/styles.js: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native'; 2 | 3 | import colors from '../../../assets/styles/colorVariables'; 4 | 5 | export default StyleSheet.create({ 6 | deleteIcon: { 7 | position: 'absolute', 8 | bottom: 20, 9 | right: 10, 10 | }, 11 | labelBadge: { 12 | color: '#FFF', 13 | fontWeight: 'bold', 14 | }, 15 | badgeStyle: { 16 | backgroundColor: colors.danger, 17 | height: 30, 18 | width: 30, 19 | borderRadius: 50, 20 | }, 21 | 22 | containerBadge: { 23 | position: 'absolute', 24 | top: -7, 25 | right: -6, 26 | }, 27 | }); 28 | -------------------------------------------------------------------------------- /app/src/components/NoHelps/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import styles from './styles'; 3 | import { View, Text, Image } from 'react-native'; 4 | export default function NoHelps({ title, color }) { 5 | const catImageColor = 6 | color == 'light' 7 | ? require('../../../assets/images/whiteCat.png') 8 | : require('../../../assets/images/blueCat.png'); 9 | return ( 10 | 11 | 12 | 19 | {title} 20 | 21 | 22 | ); 23 | } 24 | -------------------------------------------------------------------------------- /app/src/components/NoHelps/styles.js: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native'; 2 | import fonts from '../../../assets/styles/fontVariable'; 3 | import colors from '../../../assets/styles/colorVariables'; 4 | 5 | const styles = StyleSheet.create({ 6 | container: { 7 | height: '100%', 8 | width: '100%', 9 | justifyContent: 'center', 10 | alignItems: 'center', 11 | padding: 20, 12 | }, 13 | emptyListImage: { 14 | resizeMode: 'contain', 15 | width: 200, 16 | height: 200, 17 | }, 18 | 19 | emptyListTextPrimary: { 20 | ...fonts.title, 21 | color: colors.primary, 22 | marginTop: 10, 23 | textAlign: 'center', 24 | }, 25 | emptyListTextLight: { 26 | ...fonts.title, 27 | color: colors.light, 28 | marginTop: 10, 29 | textAlign: 'center', 30 | }, 31 | }); 32 | export default styles; 33 | -------------------------------------------------------------------------------- /app/src/components/NotificationCard/styles.js: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native'; 2 | 3 | import colors from '../../../assets/styles/colorVariables'; 4 | 5 | export default StyleSheet.create({ 6 | cardContainer: { 7 | maxWidth: 740, 8 | maxHeight: 240, 9 | 10 | marginTop: 15, 11 | 12 | shadowColor: '#000', 13 | shadowOffset: { 14 | width: 0, 15 | height: 1, 16 | }, 17 | shadowOpacity: 0.2, 18 | shadowRadius: 1.41, 19 | 20 | elevation: 2, 21 | 22 | backgroundColor: colors.light, 23 | borderRadius: 8, 24 | 25 | flexDirection: 'row', 26 | 27 | paddingVertical: 15, 28 | 29 | width: '100%', 30 | }, 31 | 32 | iconContent: { 33 | width: 30, 34 | height: 30, 35 | justifyContent: 'center', 36 | marginLeft: 15, 37 | borderRadius: 50, 38 | backgroundColor: colors.primary, 39 | elevation: 1, 40 | }, 41 | 42 | info: { 43 | marginLeft: 15, 44 | width: '75%', 45 | }, 46 | 47 | title: { 48 | fontWeight: 'bold', 49 | fontSize: 16, 50 | }, 51 | 52 | time: { 53 | color: 'rgba(0, 0, 0, 0.6)', 54 | fontWeight: '400', 55 | }, 56 | }); 57 | -------------------------------------------------------------------------------- /app/src/components/PlusIconTextButton/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { View, TouchableOpacity, Text } from 'react-native'; 3 | 4 | import styles from './styles'; 5 | import { Icon } from 'react-native-elements'; 6 | 7 | export default function PlusIconTextButton({ text, onPress }) { 8 | return ( 9 | 10 | 15 | 16 | {text} 17 | 18 | 19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /app/src/components/PlusIconTextButton/styles.js: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native'; 2 | import { RFValue } from 'react-native-responsive-fontsize'; 3 | import colors from '../../../assets/styles/colorVariables'; 4 | 5 | export default StyleSheet.create({ 6 | createNewOfferButtonView: { 7 | bottom: 16, 8 | right: 8, 9 | position: 'absolute', 10 | zIndex: 3, 11 | }, 12 | plusButton: { 13 | width: 150, 14 | height: 50, 15 | flexDirection: 'row', 16 | borderRadius: 25, 17 | backgroundColor: colors.primary, 18 | alignItems: 'center', 19 | justifyContent: 'center', 20 | }, 21 | plusButtonText: { 22 | color: '#fff', 23 | fontWeight: '700', 24 | fontSize: RFValue(14, 640), 25 | padding: 8, 26 | }, 27 | }); 28 | -------------------------------------------------------------------------------- /app/src/components/SelectCategoryForm/styles.js: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native'; 2 | import fonts from '../../../assets/styles/fontVariable'; 3 | import colors from '../../../assets/styles/colorVariables'; 4 | const styles = StyleSheet.create({ 5 | addCategory: { 6 | backgroundColor: colors.primary, 7 | borderWidth: 1, 8 | borderColor: colors.primary, 9 | padding: 5, 10 | marginTop: 8, 11 | alignSelf: 'flex-start', 12 | borderRadius: 5, 13 | justifyContent: 'center', 14 | alignItems: 'center', 15 | }, 16 | addCategoryText: { 17 | ...fonts.body, 18 | color: '#fff', 19 | fontSize: 18, 20 | }, 21 | categoryName: { 22 | backgroundColor: colors.secondary, 23 | padding: 5, 24 | elevation: 2, 25 | margin: 5, 26 | borderRadius: 2, 27 | }, 28 | categoriesContainer: { 29 | flexDirection: 'row', 30 | flexWrap: 'wrap', 31 | marginTop: 0, 32 | }, 33 | }); 34 | 35 | export default styles; 36 | -------------------------------------------------------------------------------- /app/src/components/UI/button/FilterButtons/styles.js: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native'; 2 | import fonts from '../../../../../assets/styles/fontVariable'; 3 | import colors from '../../../../../assets/styles/colorVariables'; 4 | 5 | const styles = StyleSheet.create({ 6 | contentButtons: { 7 | marginTop: 10, 8 | flexDirection: 'row', 9 | justifyContent: 'space-around', 10 | alignItems: 'center', 11 | alignSelf: 'center', 12 | }, 13 | helpFilterButton: { 14 | flex: 1, 15 | borderRadius: 6, 16 | borderWidth: 2, 17 | borderColor: colors.primary, 18 | height: 100, 19 | marginHorizontal: 5, 20 | justifyContent: 'space-around', 21 | }, 22 | info: { 23 | alignItems: 'center', 24 | padding: 5, 25 | height: '100%', 26 | justifyContent: 'center', 27 | }, 28 | infoPress: { 29 | backgroundColor: colors.primary, 30 | alignItems: 'center', 31 | padding: 5, 32 | height: '100%', 33 | justifyContent: 'center', 34 | }, 35 | infoText: { 36 | ...fonts.body, 37 | color: colors.primary, 38 | fontFamily: 'montserrat-semibold', 39 | fontSize: 11, 40 | textAlign: 'center', 41 | }, 42 | infoPressText: { 43 | ...fonts.body, 44 | color: colors.light, 45 | fontFamily: 'montserrat-semibold', 46 | fontSize: 11, 47 | textAlign: 'center', 48 | }, 49 | }); 50 | 51 | export default styles; 52 | -------------------------------------------------------------------------------- /app/src/components/UI/input/styles.js: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native'; 2 | import fonts from '../../../../assets/styles/fontVariable'; 3 | import colors from '../../../../assets/styles/colorVariables'; 4 | 5 | const styles = StyleSheet.create({ 6 | input: { 7 | ...fonts.body, 8 | borderWidth: 2, 9 | borderRadius: 5, 10 | padding: 10, 11 | }, 12 | validInput: { 13 | borderColor: colors.primary, 14 | }, 15 | invalidInput: { 16 | borderColor: colors.danger, 17 | }, 18 | label: { 19 | ...fonts.body, 20 | fontFamily: 'montserrat-semibold', 21 | color: colors.primary, 22 | }, 23 | }); 24 | 25 | export default styles; 26 | -------------------------------------------------------------------------------- /app/src/components/UI/selectBox/index.js: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from 'react'; 2 | import { CheckBox } from 'react-native-elements'; 3 | import styles from './styles'; 4 | export default function SelectBox({ 5 | setSelectedCategoryArray, 6 | filterCategoryArray, 7 | category, 8 | selectedCategoryArray, 9 | }) { 10 | const [selectedItem, setSelectItem] = useState( 11 | filterCategoryArray.some((categoryId) => categoryId === category._id), 12 | ); 13 | 14 | useEffect(() => { 15 | if (selectedItem) { 16 | setSelectedCategoryArray([...selectedCategoryArray, category._id]); 17 | } else { 18 | const removeFilter = filterCategoryArray.filter( 19 | (id) => id !== category._id, 20 | ); 21 | setSelectedCategoryArray(removeFilter); 22 | } 23 | }, [selectedItem]); 24 | 25 | return ( 26 | <> 27 | setSelectItem(!selectedItem)} 33 | /> 34 | 35 | ); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/components/UI/selectBox/styles.js: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native'; 2 | 3 | const styles = StyleSheet.create({ 4 | checkBoxText: { 5 | fontSize: 15, 6 | }, 7 | }); 8 | 9 | export default styles; 10 | -------------------------------------------------------------------------------- /app/src/components/atoms/ActivityFlatList/index.jsx: -------------------------------------------------------------------------------- 1 | import React, { useCallback } from 'react'; 2 | import { View } from 'react-native'; 3 | import { FlatList } from 'react-native-gesture-handler'; 4 | import { ActivityCard } from '../../organisms/ActivityCard'; 5 | 6 | export const ActivityFlatList = ({ list, onViewableItemsChanged }) => { 7 | const renderCards = ({ item }) => ( 8 | 9 | 21 | 22 | ); 23 | 24 | const memoizedFlatListItem = useCallback(renderCards, [list]); 25 | 26 | return ( 27 | item._id} 31 | horizontal 32 | pagingEnabled 33 | snapToInterval={300} 34 | viewabilityConfig={{ 35 | viewAreaCoveragePercentThreshold: 300, 36 | }} 37 | initialNumToRender={2} 38 | maxToRenderPerBatch={2} 39 | showsHorizontalScrollIndicator={false} 40 | renderItem={memoizedFlatListItem} 41 | decelerationRate="fast" 42 | onViewableItemsChanged={onViewableItemsChanged?.current} 43 | /> 44 | ); 45 | }; 46 | -------------------------------------------------------------------------------- /app/src/components/atoms/Chips/index.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from 'react'; 2 | import { Pressable, Text } from 'react-native'; 3 | import { Icon } from 'react-native-elements'; 4 | import colors from '../../../../colors'; 5 | 6 | export const Chips = ({ 7 | title, 8 | icon, 9 | hiddenIcon = false, 10 | onPress, 11 | elevated = false, 12 | type, 13 | customStyle, 14 | disabled = false, 15 | selected = false, 16 | }) => { 17 | const [isSelected, setIsSelected] = useState(selected); 18 | const chipColor = isSelected ? 'bg-secondary-500 border-0' : 'bg-white'; 19 | const elevatedStyle = elevated && 'shadow shadow-black'; 20 | const disabledStyle = disabled && 'opacity-30'; 21 | const childrenOrder = type == 'input' ? 'flex-row-reverse' : 'flex-row'; 22 | 23 | const variantsAction = { 24 | button: () => onPress(), 25 | input: () => onPress(), 26 | filter: () => { 27 | onPress(); 28 | setIsSelected(!isSelected); 29 | }, 30 | }; 31 | 32 | return ( 33 | 41 | {(!hiddenIcon || isSelected) && icon && ( 42 | 43 | )} 44 | {title} 45 | 46 | ); 47 | }; 48 | -------------------------------------------------------------------------------- /app/src/components/atoms/CircleBadge/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { View } from 'react-native'; 3 | import { Icon } from 'react-native-elements'; 4 | 5 | export const CircleBadge = ({ 6 | rank, 7 | badgeIcon, 8 | isHidden = false, 9 | size = 'sm', 10 | }) => { 11 | const iconBackgrounds = { 12 | 1: 'bg-first-rank', 13 | 2: 'bg-second-rank', 14 | 3: 'bg-thirt-rank', 15 | }; 16 | 17 | const sizes = { 18 | sm: { 19 | width: 'w-12', 20 | icon: 34, 21 | }, 22 | md: { 23 | width: 'w-16', 24 | icon: 48, 25 | }, 26 | }; 27 | 28 | const selectedSize = sizes[size]; 29 | 30 | const selectedIconBackground = isHidden ? 'bg-gray' : iconBackgrounds[rank]; 31 | return ( 32 | 35 | 41 | 42 | ); 43 | }; 44 | -------------------------------------------------------------------------------- /app/src/components/atoms/CircleIconButton/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { TouchableOpacity, View } from 'react-native'; 3 | import { Icon } from 'react-native-elements'; 4 | 5 | export const CircleIconButton = ({ 6 | icon, 7 | onPress, 8 | iconSize = 'base', 9 | color, 10 | }) => { 11 | const iconSizeVariant = { 12 | sm: 16, 13 | base: 20, 14 | lg: 24, 15 | xl: 28, 16 | '2xl': 32, 17 | }; 18 | 19 | const buttonColor = color ? color : ''; 20 | 21 | return ( 22 | 23 | 26 | 27 | 28 | 29 | ); 30 | }; 31 | -------------------------------------------------------------------------------- /app/src/components/atoms/Divider/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { View } from 'react-native'; 3 | import { styles } from './styles'; 4 | 5 | export const Divider = ({ marginHorizontal = 0 }) => { 6 | return ( 7 | 10 | ); 11 | }; 12 | -------------------------------------------------------------------------------- /app/src/components/atoms/Divider/styles.js: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native'; 2 | import { colors } from 'react-native-elements'; 3 | 4 | export const styles = StyleSheet.create({ 5 | divider: { 6 | borderBottomColor: colors.dark, 7 | borderBottomWidth: StyleSheet.hairlineWidth, 8 | marginVertical: 8, 9 | opacity: 0.3, 10 | }, 11 | }); 12 | -------------------------------------------------------------------------------- /app/src/components/atoms/IconButton/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Icon } from 'react-native-elements'; 3 | import { TouchableOpacity } from 'react-native-gesture-handler'; 4 | import colors from '../../../../assets/styles/colorVariables'; 5 | import { styles } from './styles'; 6 | 7 | export const IconButton = ({ 8 | icon, 9 | onPress, 10 | theme = 'light', 11 | iconSize = 24, 12 | customStyle, 13 | }) => { 14 | return ( 15 | 19 | 20 | 21 | ); 22 | }; 23 | -------------------------------------------------------------------------------- /app/src/components/atoms/IconButton/styles.js: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native'; 2 | import { RFValue } from 'react-native-responsive-fontsize'; 3 | 4 | export const styles = StyleSheet.create({ 5 | drawerButtonContainer: { 6 | padding: RFValue(8, 640), 7 | marginRight: RFValue(8, 640), 8 | }, 9 | }); 10 | -------------------------------------------------------------------------------- /app/src/components/atoms/InformativeField/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Text, View } from 'react-native'; 3 | import { Icon } from 'react-native-elements'; 4 | import colors from '../../../../colors'; 5 | 6 | export const InformativeField = ({ 7 | type = 'informative', 8 | title = 'Aguardando contato', 9 | text = '', 10 | }) => { 11 | const variants = { 12 | informative: { 13 | icon: 'info', 14 | color: 'bg-new_background', 15 | }, 16 | error: { 17 | icon: 'cancel', 18 | color: 'bg-danger-200', 19 | }, 20 | warning: { 21 | icon: 'error', 22 | color: 'bg-secondary-500', 23 | }, 24 | }; 25 | return ( 26 | 29 | 30 | 35 | 36 | {title} 37 | 38 | {text} 39 | 40 | 41 | 42 | 43 | ); 44 | }; 45 | -------------------------------------------------------------------------------- /app/src/components/atoms/RoundedFullButton/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Text, TouchableOpacity } from 'react-native'; 3 | 4 | export const RoundedFullButton = ({ 5 | text, 6 | onPress, 7 | variant = 'primary', 8 | disabled = false, 9 | width, 10 | }) => { 11 | const variantStyles = { 12 | primary: 'bg-primary text-white', 13 | secondary: 'bg-white text-primary border border-1 border-primary', 14 | danger: 'bg-danger text-white', 15 | warning: 'bg-warning text-black', 16 | }; 17 | 18 | const selectedVariant = variantStyles[variant]; 19 | 20 | return ( 21 | 22 | 25 | {text} 26 | 27 | 28 | ); 29 | }; 30 | -------------------------------------------------------------------------------- /app/src/components/atoms/SearchBar/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { TextInput, View } from 'react-native'; 3 | import { Icon } from 'react-native-elements'; 4 | import { IconButton } from '../IconButton'; 5 | import { styles } from './styles'; 6 | export const SearchBar = ({ value, setValue, placeholder }) => { 7 | return ( 8 | 9 | 15 | setValue(text)} 20 | /> 21 | 22 | {!!value && ( 23 | setValue('')} 29 | /> 30 | )} 31 | 32 | 33 | ); 34 | }; 35 | -------------------------------------------------------------------------------- /app/src/components/atoms/SearchBar/styles.js: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native'; 2 | import { RFValue } from 'react-native-responsive-fontsize'; 3 | import fonts from '../../../../assets/styles/fontVariable'; 4 | 5 | export const styles = StyleSheet.create({ 6 | searchBarContainer: { 7 | borderRadius: RFValue(32, 640), 8 | width: '100%', 9 | borderWidth: 0.5, 10 | borderColor: '#3535354d', 11 | paddingHorizontal: 12, 12 | paddingVertical: 8, 13 | backgroundColor: 'white', 14 | flexDirection: 'row', 15 | alignItems: 'center', 16 | maxHeight: RFValue(40, 640), 17 | marginBottom: RFValue(24, 640), 18 | }, 19 | input: { 20 | marginLeft: 4, 21 | ...fonts.body, 22 | width: '80%', 23 | }, 24 | buttonContainer: { 25 | minWidth: '5%', 26 | marginLeft: 'auto', 27 | }, 28 | iconButtonStyle: { 29 | padding: 0, 30 | }, 31 | }); 32 | -------------------------------------------------------------------------------- /app/src/components/atoms/SliderDescription/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Text } from 'react-native'; 3 | 4 | export const SliderDescription = ({ description }) => { 5 | return ( 6 | 7 | {description} 8 | 9 | ); 10 | }; 11 | -------------------------------------------------------------------------------- /app/src/components/atoms/SliderTitle/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Text } from 'react-native'; 3 | 4 | export const SliderTitle = ({ title }) => { 5 | return ( 6 | 7 | {title} 8 | 9 | ); 10 | }; 11 | -------------------------------------------------------------------------------- /app/src/components/atoms/TextButton/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Text, TouchableOpacity } from 'react-native'; 3 | 4 | export const TextButton = ({ text, onPress, className }) => { 5 | return ( 6 | 7 | 10 | {text} 11 | 12 | 13 | ); 14 | }; 15 | -------------------------------------------------------------------------------- /app/src/components/atoms/TextSwitchButton/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Text, TouchableOpacity } from 'react-native'; 3 | 4 | export const TextSwitchButton = ({ text, isSelected, onPress }) => { 5 | const style = { 6 | container: isSelected ? 'bg-white' : 'bg-transparent', 7 | text: isSelected 8 | ? ' text-primary font-ms-semibold' 9 | : 'text-black font-ms-regular', 10 | }; 11 | return ( 12 | 16 | {text} 17 | 18 | ); 19 | }; 20 | -------------------------------------------------------------------------------- /app/src/components/atoms/ViewWithDivider/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { View } from 'react-native'; 3 | 4 | export const ViewWithDivider = ({ children }) => { 5 | return {children}; 6 | }; 7 | -------------------------------------------------------------------------------- /app/src/components/modals/BaseModal/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Modal, View } from 'react-native'; 3 | import { FloatingIconButton } from '../../molecules/FloatingIconButton'; 4 | 5 | export const BaseModal = ({ 6 | isVisible, 7 | animationType = 'fade', 8 | children, 9 | onCloseModal, 10 | background = 'bg-white', 11 | }) => { 12 | return ( 13 | 19 | 20 | 23 | 27 | {children} 28 | 29 | 30 | 31 | ); 32 | }; 33 | -------------------------------------------------------------------------------- /app/src/components/modals/category/categoryDescription/styles.js: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native'; 2 | import fonts from '../../../../../assets/styles/fontVariable'; 3 | 4 | const styles = StyleSheet.create({ 5 | modalContainer: { 6 | width: '100%', 7 | height: '100%', 8 | backgroundColor: 'rgba(0,0,0,0.3)', 9 | }, 10 | modalContent: { 11 | paddingTop: 50, 12 | backgroundColor: '#fff', 13 | padding: 20, 14 | marginBottom: 50, 15 | borderRadius: 20, 16 | top: '2.5%', 17 | }, 18 | title: { 19 | ...fonts.title, 20 | fontSize: 20, 21 | alignSelf: 'center', 22 | marginBottom: 10, 23 | fontFamily: 'montserrat-semibold', 24 | }, 25 | description: { 26 | ...fonts.body, 27 | marginBottom: 10, 28 | }, 29 | icon: { 30 | top: '5.5%', 31 | right: 20, 32 | position: 'absolute', 33 | zIndex: 5, 34 | }, 35 | }); 36 | 37 | export default styles; 38 | -------------------------------------------------------------------------------- /app/src/components/modals/conditionTermsModal/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Modal, TouchableOpacity, ScrollView, View } from 'react-native'; 3 | import { Icon } from 'react-native-elements'; 4 | import colors from '../../../../assets/styles/colorVariables'; 5 | import styles from './style'; 6 | import Markdown from 'react-native-markdown-display'; 7 | import terms from '../../../docs/terms'; 8 | 9 | export default function TermsModal({ visible, setVisible }) { 10 | return ( 11 | setVisible(false)} 14 | animationType="slide" 15 | > 16 | setVisible(false)} 19 | > 20 | 26 | 27 | 31 | 32 | {terms} 33 | 34 | 35 | 36 | ); 37 | } 38 | -------------------------------------------------------------------------------- /app/src/components/modals/conditionTermsModal/style.js: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native'; 2 | import fonts from '../../../../assets/styles/fontVariable'; 3 | const styles = StyleSheet.create({ 4 | closeButton: { 5 | position: 'absolute', 6 | zIndex: 5, 7 | right: 15, 8 | top: 15, 9 | }, 10 | privacyLink: { 11 | marginVertical: 20, 12 | width: 240, 13 | }, 14 | privacyText: { 15 | ...fonts.subtitle, 16 | borderBottomWidth: StyleSheet.hairlineWidth, 17 | borderBottomColor: '#000', 18 | fontSize: 16, 19 | }, 20 | }); 21 | export default styles; 22 | -------------------------------------------------------------------------------- /app/src/components/modals/newHelpModal/failure/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Modal, View, Text } from 'react-native'; 3 | import Button from '../../../UI/button'; 4 | import styles from './styles'; 5 | 6 | export default function NewHelpModal({ visible, onOkPressed, errorMessage }) { 7 | return ( 8 | 9 | 15 | 16 | 17 | {errorMessage || 18 | 'Houve algum problema com sua solicitação. Tente mais tarde.'} 19 | 20 | 21 |