├── .watchmanconfig
├── .npmrc
├── src
├── package.json
├── api
│ ├── package.json
│ ├── endpoints.js
│ ├── index.js
│ └── api.js
├── lib
│ ├── package.json
│ ├── Capitalise.js
│ ├── shouldLogin.js
│ ├── errorHandler.js
│ ├── abortController.js
│ ├── interactions.js
│ ├── inputsValidations.js
│ ├── notificationHandler.js
│ └── moment.js
├── assets
│ ├── package.json
│ ├── imgs
│ │ ├── x.png
│ │ ├── back.png
│ │ ├── check.png
│ │ ├── close.png
│ │ ├── empty.png
│ │ ├── filter.png
│ │ ├── home.png
│ │ ├── icon.jpg
│ │ ├── user.png
│ │ ├── view.png
│ │ ├── logoText.png
│ │ ├── signout.png
│ │ ├── singaled.png
│ │ ├── SNPI-Text.png
│ │ ├── SNPI-logo.png
│ │ ├── arrow-back.png
│ │ ├── arrow-down.png
│ │ ├── arrow-left.png
│ │ ├── homepicture.png
│ │ ├── invisible.png
│ │ ├── logoImage.png
│ │ ├── chevron-left.png
│ │ ├── syndicat_logo.PNG
│ │ ├── arrow-back-white.png
│ │ ├── arrow-left-black.png
│ │ ├── chevron-left@2X.png
│ │ ├── logo-snpi-caci.png
│ │ ├── logo-snpi-syndic.png
│ │ ├── passwordMessage.png
│ │ ├── apple-wallet-logo.png
│ │ ├── google-wallet-logo.png
│ │ ├── logo-snpi-experts.png
│ │ ├── SNPI-logo-transparent.png
│ │ ├── adherent_card_caci_top.png
│ │ ├── adherent_card_expert_bg.png
│ │ └── adherent_card_caci_bottom.png
│ └── fonts
│ │ ├── Open Sans.ttf
│ │ ├── PTSans-Bold.ttf
│ │ ├── Poppins-Bold.ttf
│ │ ├── PTSans-Italic.ttf
│ │ ├── PTSans-Regular.ttf
│ │ ├── Poppins-Light.ttf
│ │ ├── unicode.optima.ttf
│ │ ├── PTSans-BoldItalic.ttf
│ │ └── Poppins-ExtraLight.ttf
├── common
│ ├── package.json
│ ├── colors
│ │ ├── package.json
│ │ └── index.js
│ ├── styles
│ │ ├── package.json
│ │ └── index.js
│ └── components
│ │ ├── package.json
│ │ ├── Button
│ │ ├── styles.js
│ │ └── index.js
│ │ └── Input
│ │ ├── styles.js
│ │ └── index.js
├── config
│ ├── package.json
│ ├── appConfig.js
│ ├── strings.js
│ ├── api.js
│ ├── api-production.js
│ ├── api-staging.js
│ └── languages.js
├── hooks
│ ├── package.json
│ ├── index.js
│ └── useKeyboardAware.js
├── router
│ ├── package.json
│ ├── navigator.js
│ ├── routingConfig.js
│ ├── NavigationService.js
│ └── index.js
├── store
│ ├── package.json
│ └── index.js
├── utils
│ ├── package.json
│ ├── injectLocales.js
│ ├── checkStore.js
│ ├── injectReducers.js
│ └── reducerInjectors.js
├── actions
│ ├── package.json
│ ├── index.js
│ ├── adherentCardActions.js
│ ├── notificationsPermissionsActions.js
│ └── globalActions.js
├── locales
│ ├── package.json
│ └── fr.js
├── modules
│ ├── package.json
│ ├── ForceUpdate
│ │ ├── locales
│ │ │ └── fr.js
│ │ ├── routes.js
│ │ └── containers
│ │ │ ├── index.js
│ │ │ └── components
│ │ │ ├── index.js
│ │ │ └── styles.js
│ ├── Home
│ │ ├── locales
│ │ │ └── fr.js
│ │ ├── api
│ │ │ └── index.js
│ │ ├── actionsTypes
│ │ │ └── index.js
│ │ ├── routes.js
│ │ ├── containers
│ │ │ ├── Details
│ │ │ │ ├── index.js
│ │ │ │ └── components
│ │ │ │ │ └── styles.js
│ │ │ └── Home
│ │ │ │ └── index.js
│ │ ├── reducers
│ │ │ └── index.js
│ │ ├── scripts
│ │ │ └── time.js
│ │ ├── components
│ │ │ └── item
│ │ │ │ ├── styles.js
│ │ │ │ └── index.js
│ │ └── actions
│ │ │ └── index.js
│ ├── Auth
│ │ ├── api
│ │ │ └── endpoints.js
│ │ ├── containers
│ │ │ ├── passwordMessage
│ │ │ │ ├── index.js
│ │ │ │ └── components
│ │ │ │ │ ├── styles.js
│ │ │ │ │ └── index.js
│ │ │ ├── homePage
│ │ │ │ ├── index.js
│ │ │ │ └── components
│ │ │ │ │ ├── styles.js
│ │ │ │ │ └── index.js
│ │ │ ├── resetPassword
│ │ │ │ ├── index.js
│ │ │ │ └── components
│ │ │ │ │ ├── styles.js
│ │ │ │ │ └── index.js
│ │ │ └── Login
│ │ │ │ ├── index.js
│ │ │ │ └── components
│ │ │ │ └── styles.js
│ │ ├── components
│ │ │ ├── cguText
│ │ │ │ ├── styles.js
│ │ │ │ └── index.js
│ │ │ ├── Switcher
│ │ │ │ ├── index.js
│ │ │ │ └── styles.js
│ │ │ └── authHeader
│ │ │ │ ├── styles.js
│ │ │ │ └── index.js
│ │ ├── actionsTypes
│ │ │ └── index.js
│ │ ├── routes.js
│ │ ├── reducers
│ │ │ └── index.js
│ │ └── locales
│ │ │ └── fr.js
│ ├── Profile
│ │ ├── api
│ │ │ └── index.js
│ │ ├── actionsTypes
│ │ │ └── index.js
│ │ ├── route.js
│ │ ├── locales
│ │ │ └── fr.js
│ │ ├── containers
│ │ │ ├── notifications
│ │ │ │ ├── index.js
│ │ │ │ └── components
│ │ │ │ │ └── styles.js
│ │ │ ├── card
│ │ │ │ ├── index.js
│ │ │ │ └── components
│ │ │ │ │ └── styles.js
│ │ │ ├── compte
│ │ │ │ ├── index.js
│ │ │ │ └── components
│ │ │ │ │ └── styles.js
│ │ │ └── followers
│ │ │ │ ├── index.js
│ │ │ │ └── components
│ │ │ │ └── styles.js
│ │ ├── reducers
│ │ │ └── index.js
│ │ └── actions
│ │ │ └── index.js
│ └── CheckAuth
│ │ ├── routes.js
│ │ └── index.js
├── reducers
│ ├── package.json
│ ├── notificationsPermissionsReducer.js
│ ├── globalReducer.js
│ ├── adherentCardReducer.js
│ └── index.js
├── services
│ ├── package.json
│ └── ga-api.js
├── actionsTypes
│ ├── package.json
│ ├── index.js
│ └── globalTypes.js
├── contextProviders
│ ├── package.json
│ ├── NetworkProvider
│ │ └── index.js
│ └── AppStateProvider
│ │ └── index.js
├── scripts
│ ├── ejectModule.js
│ └── generate.routes.js
└── index.js
├── .env
├── jest.config.js
├── .bundle
└── config
├── .eslintrc.js
├── android
├── app
│ ├── debug.keystore
│ ├── src
│ │ ├── main
│ │ │ ├── assets
│ │ │ │ ├── appcenter-config.json
│ │ │ │ └── fonts
│ │ │ │ │ ├── Entypo.ttf
│ │ │ │ │ ├── Feather.ttf
│ │ │ │ │ ├── Fontisto.ttf
│ │ │ │ │ ├── Ionicons.ttf
│ │ │ │ │ ├── Octicons.ttf
│ │ │ │ │ ├── Roboto.ttf
│ │ │ │ │ ├── Zocial.ttf
│ │ │ │ │ ├── AntDesign.ttf
│ │ │ │ │ ├── EvilIcons.ttf
│ │ │ │ │ ├── Foundation.ttf
│ │ │ │ │ ├── FontAwesome.ttf
│ │ │ │ │ ├── Ionicons.ttf.zip
│ │ │ │ │ ├── MaterialIcons.ttf
│ │ │ │ │ ├── PTSans-Bold.ttf
│ │ │ │ │ ├── PTSans-Italic.ttf
│ │ │ │ │ ├── Poppins-Bold.ttf
│ │ │ │ │ ├── Poppins-Light.ttf
│ │ │ │ │ ├── Roboto_medium.ttf
│ │ │ │ │ ├── Metropolis-Bold.otf
│ │ │ │ │ ├── PTSans-Regular.ttf
│ │ │ │ │ ├── SimpleLineIcons.ttf
│ │ │ │ │ ├── VIPRawyRegular.otf
│ │ │ │ │ ├── FontAwesome5_Solid.ttf
│ │ │ │ │ ├── Metropolis-Medium.otf
│ │ │ │ │ ├── Metropolis-Regular.otf
│ │ │ │ │ ├── PTSans-BoldItalic.ttf
│ │ │ │ │ ├── Poppins-ExtraLight.ttf
│ │ │ │ │ ├── VIPRawyBold-Bold.otf
│ │ │ │ │ ├── rubicon-icon-font.ttf
│ │ │ │ │ ├── FontAwesome5_Brands.ttf
│ │ │ │ │ ├── FontAwesome5_Regular.ttf
│ │ │ │ │ ├── Metropolis-SemiBold.otf
│ │ │ │ │ ├── ProximaNovaExtrabold.otf
│ │ │ │ │ └── MaterialCommunityIcons.ttf
│ │ │ ├── res
│ │ │ │ ├── drawable
│ │ │ │ │ ├── screen.png
│ │ │ │ │ ├── notification_icon.png
│ │ │ │ │ ├── src_assets_imgs_x.png
│ │ │ │ │ ├── src_assets_imgs_back.png
│ │ │ │ │ ├── src_assets_imgs_icon.jpg
│ │ │ │ │ ├── src_assets_imgs_view.png
│ │ │ │ │ ├── src_assets_imgs_check.png
│ │ │ │ │ ├── src_assets_imgs_close.png
│ │ │ │ │ ├── src_assets_imgs_filter.png
│ │ │ │ │ ├── src_assets_imgs_arrowback.png
│ │ │ │ │ ├── src_assets_imgs_invisible.png
│ │ │ │ │ ├── src_assets_imgs_snpilogo.png
│ │ │ │ │ ├── src_assets_imgs_snpitext.png
│ │ │ │ │ ├── src_assets_imgs_chevronleft.png
│ │ │ │ │ ├── src_assets_imgs_homepicture.png
│ │ │ │ │ └── src_assets_imgs_passwordmessage.png
│ │ │ │ ├── drawable-hdpi
│ │ │ │ │ └── screen.png
│ │ │ │ ├── drawable-land
│ │ │ │ │ └── screen.png
│ │ │ │ ├── drawable-mdpi
│ │ │ │ │ └── screen.png
│ │ │ │ ├── drawable-xhdpi
│ │ │ │ │ └── screen.png
│ │ │ │ ├── drawable-xxhdpi
│ │ │ │ │ └── screen.png
│ │ │ │ ├── drawable-xxxhdpi
│ │ │ │ │ └── screen.png
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── drawable-land-hdpi
│ │ │ │ │ └── screen.png
│ │ │ │ ├── drawable-land-ldpi
│ │ │ │ │ └── screen.png
│ │ │ │ ├── drawable-land-mdpi
│ │ │ │ │ └── screen.png
│ │ │ │ ├── drawable-land-xhdpi
│ │ │ │ │ └── screen.png
│ │ │ │ ├── drawable-land-xxhdpi
│ │ │ │ │ └── screen.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── drawable-land-xxxhdpi
│ │ │ │ │ └── screen.png
│ │ │ │ ├── raw
│ │ │ │ │ ├── app.json
│ │ │ │ │ ├── node_modules_reactnativevectoricons_glyphmaps_evilicons.json
│ │ │ │ │ └── node_modules_reactnativevectoricons_glyphmaps_zocial.json
│ │ │ │ ├── values
│ │ │ │ │ ├── styles.xml
│ │ │ │ │ └── strings.xml
│ │ │ │ ├── xml
│ │ │ │ │ └── network_security_config.xml
│ │ │ │ └── layout
│ │ │ │ │ └── launch_screen.xml
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── snpinews
│ │ │ │ │ ├── MainActivity.kt
│ │ │ │ │ └── MainApplication.kt
│ │ │ └── AndroidManifest.xml
│ │ └── debug
│ │ │ └── AndroidManifest.xml
│ ├── .classpath
│ ├── proguard-rules.pro
│ ├── build_defs.bzl
│ ├── .project
│ └── BUCK
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── settings.gradle
├── build.gradle
├── .project
├── gradle.properties
└── gradlew.bat
├── .prettierrc.js
├── ios
├── SNPINews
│ ├── Images.xcassets
│ │ ├── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ ├── 1024.png
│ │ │ ├── 120.png
│ │ │ ├── 180.png
│ │ │ ├── 40.png
│ │ │ ├── 58.png
│ │ │ ├── 60.png
│ │ │ ├── 80.png
│ │ │ ├── 87.png
│ │ │ ├── 120 1.png
│ │ │ └── Contents.json
│ ├── PrivacyInfo.xcprivacy
│ ├── AppDelegate.swift
│ └── Info.plist
├── SNPINews.xcworkspace
│ └── contents.xcworkspacedata
├── .xcode.env
├── Podfile
└── SNPINews.xcodeproj
│ └── xcshareddata
│ └── xcschemes
│ └── SNPINews.xcscheme
├── app.json
├── README.md
├── index.js
├── .babelrc
├── __tests__
└── App.test.tsx
├── metro.config.js
├── Gemfile
├── .github
└── FUNDING.yml
├── tsconfig.json
├── babel.config.js
├── .gitignore
└── package.json
/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | legacy-peer-deps=true
--------------------------------------------------------------------------------
/src/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "src"
3 | }
4 |
--------------------------------------------------------------------------------
/src/api/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "api"
3 | }
4 |
--------------------------------------------------------------------------------
/src/lib/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "lib"
3 | }
4 |
--------------------------------------------------------------------------------
/src/assets/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "assets"
3 | }
4 |
--------------------------------------------------------------------------------
/src/common/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "common"
3 | }
4 |
--------------------------------------------------------------------------------
/src/config/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "config"
3 | }
4 |
--------------------------------------------------------------------------------
/src/hooks/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "hooks"
3 | }
4 |
--------------------------------------------------------------------------------
/src/router/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "router"
3 | }
4 |
--------------------------------------------------------------------------------
/src/store/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "store"
3 | }
4 |
--------------------------------------------------------------------------------
/src/utils/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "utils"
3 | }
4 |
--------------------------------------------------------------------------------
/src/actions/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "actions"
3 | }
4 |
--------------------------------------------------------------------------------
/src/locales/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "locales"
3 | }
4 |
--------------------------------------------------------------------------------
/src/modules/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "modules"
3 | }
4 |
--------------------------------------------------------------------------------
/src/reducers/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "reducers"
3 | }
4 |
--------------------------------------------------------------------------------
/src/services/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "services"
3 | }
4 |
--------------------------------------------------------------------------------
/src/common/colors/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "colors"
3 | }
4 |
--------------------------------------------------------------------------------
/src/common/styles/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "styles"
3 | }
4 |
--------------------------------------------------------------------------------
/.env:
--------------------------------------------------------------------------------
1 | SIZE_MATTERS_BASE_WIDTH=390
2 | SIZE_MATTERS_BASE_HEIGHT=844
3 |
--------------------------------------------------------------------------------
/src/actionsTypes/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "actionstypes"
3 | }
4 |
--------------------------------------------------------------------------------
/src/common/components/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "components"
3 | }
4 |
--------------------------------------------------------------------------------
/src/contextProviders/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "contexts"
3 | }
4 |
--------------------------------------------------------------------------------
/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | preset: 'react-native',
3 | };
4 |
--------------------------------------------------------------------------------
/.bundle/config:
--------------------------------------------------------------------------------
1 | BUNDLE_PATH: "vendor/bundle"
2 | BUNDLE_FORCE_RUBY_PLATFORM: 1
3 |
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: '@react-native',
4 | };
5 |
--------------------------------------------------------------------------------
/src/actions/index.js:
--------------------------------------------------------------------------------
1 | // CONFIGURE REDUX ACTIONS
2 |
3 | export * from './globalActions';
4 |
--------------------------------------------------------------------------------
/src/actionsTypes/index.js:
--------------------------------------------------------------------------------
1 | // CONFIGURE REDUX ACTIONS TYPES
2 |
3 | export * from './globalTypes';
4 |
--------------------------------------------------------------------------------
/src/assets/imgs/x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/x.png
--------------------------------------------------------------------------------
/src/hooks/index.js:
--------------------------------------------------------------------------------
1 | import useKeyboardAware from './useKeyboardAware';
2 |
3 | export {useKeyboardAware};
4 |
--------------------------------------------------------------------------------
/android/app/debug.keystore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/debug.keystore
--------------------------------------------------------------------------------
/android/app/src/main/assets/appcenter-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "app_secret": "1a3fc71b-2ff8-4720-9fee-ceddb5c859d9"
3 | }
4 |
--------------------------------------------------------------------------------
/src/assets/imgs/back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/back.png
--------------------------------------------------------------------------------
/src/assets/imgs/check.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/check.png
--------------------------------------------------------------------------------
/src/assets/imgs/close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/close.png
--------------------------------------------------------------------------------
/src/assets/imgs/empty.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/empty.png
--------------------------------------------------------------------------------
/src/assets/imgs/filter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/filter.png
--------------------------------------------------------------------------------
/src/assets/imgs/home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/home.png
--------------------------------------------------------------------------------
/src/assets/imgs/icon.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/icon.jpg
--------------------------------------------------------------------------------
/src/assets/imgs/user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/user.png
--------------------------------------------------------------------------------
/src/assets/imgs/view.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/view.png
--------------------------------------------------------------------------------
/.prettierrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | arrowParens: 'avoid',
3 | singleQuote: true,
4 | trailingComma: 'all',
5 | };
6 |
--------------------------------------------------------------------------------
/src/assets/imgs/logoText.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/logoText.png
--------------------------------------------------------------------------------
/src/assets/imgs/signout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/signout.png
--------------------------------------------------------------------------------
/src/assets/imgs/singaled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/singaled.png
--------------------------------------------------------------------------------
/ios/SNPINews/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/assets/fonts/Open Sans.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/fonts/Open Sans.ttf
--------------------------------------------------------------------------------
/src/assets/imgs/SNPI-Text.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/SNPI-Text.png
--------------------------------------------------------------------------------
/src/assets/imgs/SNPI-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/SNPI-logo.png
--------------------------------------------------------------------------------
/src/assets/imgs/arrow-back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/arrow-back.png
--------------------------------------------------------------------------------
/src/assets/imgs/arrow-down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/arrow-down.png
--------------------------------------------------------------------------------
/src/assets/imgs/arrow-left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/arrow-left.png
--------------------------------------------------------------------------------
/src/assets/imgs/homepicture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/homepicture.png
--------------------------------------------------------------------------------
/src/assets/imgs/invisible.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/invisible.png
--------------------------------------------------------------------------------
/src/assets/imgs/logoImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/logoImage.png
--------------------------------------------------------------------------------
/src/assets/fonts/PTSans-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/fonts/PTSans-Bold.ttf
--------------------------------------------------------------------------------
/src/assets/fonts/Poppins-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/fonts/Poppins-Bold.ttf
--------------------------------------------------------------------------------
/src/assets/imgs/chevron-left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/chevron-left.png
--------------------------------------------------------------------------------
/src/assets/imgs/syndicat_logo.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/syndicat_logo.PNG
--------------------------------------------------------------------------------
/src/assets/fonts/PTSans-Italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/fonts/PTSans-Italic.ttf
--------------------------------------------------------------------------------
/src/assets/fonts/PTSans-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/fonts/PTSans-Regular.ttf
--------------------------------------------------------------------------------
/src/assets/fonts/Poppins-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/fonts/Poppins-Light.ttf
--------------------------------------------------------------------------------
/src/assets/fonts/unicode.optima.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/fonts/unicode.optima.ttf
--------------------------------------------------------------------------------
/src/assets/imgs/arrow-back-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/arrow-back-white.png
--------------------------------------------------------------------------------
/src/assets/imgs/arrow-left-black.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/arrow-left-black.png
--------------------------------------------------------------------------------
/src/assets/imgs/chevron-left@2X.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/chevron-left@2X.png
--------------------------------------------------------------------------------
/src/assets/imgs/logo-snpi-caci.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/logo-snpi-caci.png
--------------------------------------------------------------------------------
/src/assets/imgs/logo-snpi-syndic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/logo-snpi-syndic.png
--------------------------------------------------------------------------------
/src/assets/imgs/passwordMessage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/passwordMessage.png
--------------------------------------------------------------------------------
/src/assets/fonts/PTSans-BoldItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/fonts/PTSans-BoldItalic.ttf
--------------------------------------------------------------------------------
/src/assets/imgs/apple-wallet-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/apple-wallet-logo.png
--------------------------------------------------------------------------------
/src/assets/imgs/google-wallet-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/google-wallet-logo.png
--------------------------------------------------------------------------------
/src/assets/imgs/logo-snpi-experts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/logo-snpi-experts.png
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/src/api/endpoints.js:
--------------------------------------------------------------------------------
1 | export function meUrl() {
2 | return "/user";
3 | }
4 |
5 | export function refresh() {
6 | return "/user/refresh";
7 | }
8 |
--------------------------------------------------------------------------------
/src/assets/fonts/Poppins-ExtraLight.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/fonts/Poppins-ExtraLight.ttf
--------------------------------------------------------------------------------
/src/assets/imgs/SNPI-logo-transparent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/SNPI-logo-transparent.png
--------------------------------------------------------------------------------
/src/modules/ForceUpdate/locales/fr.js:
--------------------------------------------------------------------------------
1 | export default {
2 | update: "Nouvelle mise à jour disponible.",
3 | visit_store: "Mettre à jour",
4 | };
5 |
--------------------------------------------------------------------------------
/src/assets/imgs/adherent_card_caci_top.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/adherent_card_caci_top.png
--------------------------------------------------------------------------------
/src/assets/imgs/adherent_card_expert_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/adherent_card_expert_bg.png
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Entypo.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/assets/fonts/Entypo.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Feather.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/assets/fonts/Feather.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Fontisto.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/assets/fonts/Fontisto.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Ionicons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/assets/fonts/Ionicons.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Octicons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/assets/fonts/Octicons.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Roboto.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/assets/fonts/Roboto.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Zocial.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/assets/fonts/Zocial.ttf
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/res/drawable/screen.png
--------------------------------------------------------------------------------
/src/assets/imgs/adherent_card_caci_bottom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/src/assets/imgs/adherent_card_caci_bottom.png
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/AntDesign.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/assets/fonts/AntDesign.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/EvilIcons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/assets/fonts/EvilIcons.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Foundation.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/assets/fonts/Foundation.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/FontAwesome.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/assets/fonts/FontAwesome.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Ionicons.ttf.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/assets/fonts/Ionicons.ttf.zip
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/MaterialIcons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/assets/fonts/MaterialIcons.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/PTSans-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/assets/fonts/PTSans-Bold.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/PTSans-Italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/assets/fonts/PTSans-Italic.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Poppins-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/assets/fonts/Poppins-Bold.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Poppins-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/assets/fonts/Poppins-Light.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Roboto_medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/assets/fonts/Roboto_medium.ttf
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-hdpi/screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/res/drawable-hdpi/screen.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-land/screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/res/drawable-land/screen.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/res/drawable-mdpi/screen.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xhdpi/screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/res/drawable-xhdpi/screen.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xxhdpi/screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/res/drawable-xxhdpi/screen.png
--------------------------------------------------------------------------------
/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "snpiNews",
3 | "displayName": "SNPI News",
4 | "splash": {
5 | "backgroundColor": "#ffffff",
6 | "resizeMode": "contain"
7 | }
8 | }
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Metropolis-Bold.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/assets/fonts/Metropolis-Bold.otf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/PTSans-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/assets/fonts/PTSans-Regular.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/SimpleLineIcons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/assets/fonts/SimpleLineIcons.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/VIPRawyRegular.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/assets/fonts/VIPRawyRegular.otf
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xxxhdpi/screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/res/drawable-xxxhdpi/screen.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/FontAwesome5_Solid.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/assets/fonts/FontAwesome5_Solid.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Metropolis-Medium.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/assets/fonts/Metropolis-Medium.otf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Metropolis-Regular.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/assets/fonts/Metropolis-Regular.otf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/PTSans-BoldItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/assets/fonts/PTSans-BoldItalic.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Poppins-ExtraLight.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/assets/fonts/Poppins-ExtraLight.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/VIPRawyBold-Bold.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/assets/fonts/VIPRawyBold-Bold.otf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/rubicon-icon-font.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/assets/fonts/rubicon-icon-font.ttf
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-land-hdpi/screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/res/drawable-land-hdpi/screen.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-land-ldpi/screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/res/drawable-land-ldpi/screen.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-land-mdpi/screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/res/drawable-land-mdpi/screen.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-land-xhdpi/screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/res/drawable-land-xhdpi/screen.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-land-xxhdpi/screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/res/drawable-land-xxhdpi/screen.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/notification_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/res/drawable/notification_icon.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/src_assets_imgs_x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/res/drawable/src_assets_imgs_x.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/ios/SNPINews/Images.xcassets/AppIcon.appiconset/1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/ios/SNPINews/Images.xcassets/AppIcon.appiconset/1024.png
--------------------------------------------------------------------------------
/ios/SNPINews/Images.xcassets/AppIcon.appiconset/120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/ios/SNPINews/Images.xcassets/AppIcon.appiconset/120.png
--------------------------------------------------------------------------------
/ios/SNPINews/Images.xcassets/AppIcon.appiconset/180.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/ios/SNPINews/Images.xcassets/AppIcon.appiconset/180.png
--------------------------------------------------------------------------------
/ios/SNPINews/Images.xcassets/AppIcon.appiconset/40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/ios/SNPINews/Images.xcassets/AppIcon.appiconset/40.png
--------------------------------------------------------------------------------
/ios/SNPINews/Images.xcassets/AppIcon.appiconset/58.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/ios/SNPINews/Images.xcassets/AppIcon.appiconset/58.png
--------------------------------------------------------------------------------
/ios/SNPINews/Images.xcassets/AppIcon.appiconset/60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/ios/SNPINews/Images.xcassets/AppIcon.appiconset/60.png
--------------------------------------------------------------------------------
/ios/SNPINews/Images.xcassets/AppIcon.appiconset/80.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/ios/SNPINews/Images.xcassets/AppIcon.appiconset/80.png
--------------------------------------------------------------------------------
/ios/SNPINews/Images.xcassets/AppIcon.appiconset/87.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/ios/SNPINews/Images.xcassets/AppIcon.appiconset/87.png
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/FontAwesome5_Brands.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/assets/fonts/FontAwesome5_Brands.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/FontAwesome5_Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/assets/fonts/FontAwesome5_Regular.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Metropolis-SemiBold.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/assets/fonts/Metropolis-SemiBold.otf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/ProximaNovaExtrabold.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/assets/fonts/ProximaNovaExtrabold.otf
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-land-xxxhdpi/screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/res/drawable-land-xxxhdpi/screen.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/src_assets_imgs_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/res/drawable/src_assets_imgs_back.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/src_assets_imgs_icon.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/res/drawable/src_assets_imgs_icon.jpg
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/src_assets_imgs_view.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/res/drawable/src_assets_imgs_view.png
--------------------------------------------------------------------------------
/ios/SNPINews/Images.xcassets/AppIcon.appiconset/120 1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/ios/SNPINews/Images.xcassets/AppIcon.appiconset/120 1.png
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/src_assets_imgs_check.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/res/drawable/src_assets_imgs_check.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/src_assets_imgs_close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/res/drawable/src_assets_imgs_close.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/src_assets_imgs_filter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/res/drawable/src_assets_imgs_filter.png
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Feel free to fork and custom this project for React-Native-SDK.
2 |
3 |
4 | # Refer to this live App Urls : https://play.google.com/store/apps/details?id=com.snpi.news.pro&pli=1
5 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/src_assets_imgs_arrowback.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/res/drawable/src_assets_imgs_arrowback.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/src_assets_imgs_invisible.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/res/drawable/src_assets_imgs_invisible.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/src_assets_imgs_snpilogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/res/drawable/src_assets_imgs_snpilogo.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/src_assets_imgs_snpitext.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/res/drawable/src_assets_imgs_snpitext.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/src_assets_imgs_chevronleft.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/res/drawable/src_assets_imgs_chevronleft.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/src_assets_imgs_homepicture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/res/drawable/src_assets_imgs_homepicture.png
--------------------------------------------------------------------------------
/android/app/src/main/res/raw/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "SNPINews",
3 | "displayName": "SNPI News",
4 | "splash": {
5 | "backgroundColor": "#ffffff",
6 | "resizeMode": "contain"
7 | }
8 | }
--------------------------------------------------------------------------------
/src/lib/Capitalise.js:
--------------------------------------------------------------------------------
1 | export const Capitalize = (str) => {
2 | return str && str.length && str.length >= 1
3 | ? str.charAt(0).toUpperCase() + str.slice(1).toLowerCase()
4 | : "";
5 | };
6 |
--------------------------------------------------------------------------------
/src/config/appConfig.js:
--------------------------------------------------------------------------------
1 | // Forcer l'utilisateur à mise à jourer l'application via les stores
2 | // By default - In the pub case should be false, else trues
3 | export const forceUpdateFromStore = false;
4 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/src_assets_imgs_passwordmessage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angrytidy/ReactNative-SDK-SNPI-NEWS/HEAD/android/app/src/main/res/drawable/src_assets_imgs_passwordmessage.png
--------------------------------------------------------------------------------
/src/config/strings.js:
--------------------------------------------------------------------------------
1 | import LocalizedStrings from 'react-native-localization';
2 |
3 | import fr from 'locales/fr';
4 |
5 | let strings = new LocalizedStrings({
6 | fr,
7 | });
8 |
9 | export default strings;
10 |
--------------------------------------------------------------------------------
/src/api/index.js:
--------------------------------------------------------------------------------
1 | import CONFIG from "config/api";
2 |
3 | const { API_BASE_URL, API_VERSION } = CONFIG;
4 | const baseURL = `${API_BASE_URL}`; //${API_VERSION}
5 |
6 | import Api from "./api";
7 |
8 | export { Api, baseURL };
9 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import { AppRegistry } from 'react-native';
6 | import App from './App';
7 | import { name as appName } from './app.json';
8 |
9 | AppRegistry.registerComponent(appName, () => App);
10 |
--------------------------------------------------------------------------------
/src/modules/Home/locales/fr.js:
--------------------------------------------------------------------------------
1 | export default {
2 | tri_title: "Trier les news par",
3 | recent: "Les plus récentes en premier",
4 | old: "Les plus anciennes en premier",
5 | featured: "A la une",
6 | visited: "Les plus lues",
7 | };
8 |
--------------------------------------------------------------------------------
/src/modules/Auth/api/endpoints.js:
--------------------------------------------------------------------------------
1 | export function loginUrl() {
2 | return "/user/login";
3 | }
4 |
5 | export function passwordUrl() {
6 | return "/auth/users/forgot";
7 | }
8 |
9 | export function logoutUrl() {
10 | return "/user/logout";
11 | }
12 |
--------------------------------------------------------------------------------
/src/modules/Home/api/index.js:
--------------------------------------------------------------------------------
1 | export const getList = (limit, offset, sort, order) => {
2 | return `/news?target=app&limit=${limit}&offset=${offset}&sort=${sort}&order=${order}`;
3 | };
4 |
5 | export const getOne = (id) => {
6 | return `/news/${id}`;
7 | };
8 |
--------------------------------------------------------------------------------
/src/config/api.js:
--------------------------------------------------------------------------------
1 | export default {
2 | BASE_URL: "https://snpi.pro",
3 | // SOCKET_BASE_URL: 'https://masante.flexi-apps.com',
4 | API_BASE_URL: "https://api.snpi.pro",
5 | API_VERSION: "/v1",
6 | REQUEST_TIMER: 30000,
7 | POSTMAN_COLLECTION: "",
8 | };
9 |
--------------------------------------------------------------------------------
/src/config/api-production.js:
--------------------------------------------------------------------------------
1 | export default {
2 | BASE_URL: "https://snpi.pro",
3 | // SOCKET_BASE_URL: 'https://masante.flexi-apps.com',
4 | API_BASE_URL: "https://api.snpi.pro",
5 | API_VERSION: "/v1",
6 | REQUEST_TIMER: 30000,
7 | POSTMAN_COLLECTION: "",
8 | };
9 |
--------------------------------------------------------------------------------
/src/config/api-staging.js:
--------------------------------------------------------------------------------
1 | export default {
2 | BASE_URL: "https://staging.snpi.pro",
3 | // SOCKET_BASE_URL: 'https://masante.flexi-apps.com',
4 | API_BASE_URL: "https://api.staging.snpi.pro",
5 | API_VERSION: "/v1",
6 | REQUEST_TIMER: 30000,
7 | POSTMAN_COLLECTION: "",
8 | };
9 |
--------------------------------------------------------------------------------
/src/router/navigator.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export const navigationRef = React.createRef(null);
4 |
5 | export const navigate = (name, params) => {
6 | if (navigationRef.current) {
7 | navigationRef.current.navigate(name, params);
8 | }
9 | };
10 |
--------------------------------------------------------------------------------
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "plugins": [
3 | ["dotenv-import", {
4 | "moduleName": "@env",
5 | "path": ".env",
6 | "blacklist": null,
7 | "whitelist": null,
8 | "safe": false,
9 | "allowUndefined": false
10 | }]
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/src/modules/Auth/containers/passwordMessage/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import PasswordMessageComponent from './components';
3 |
4 |
5 | const PasswordMessage = (props) => {
6 | return ;
7 | };
8 |
9 | export default PasswordMessage;
10 |
--------------------------------------------------------------------------------
/src/modules/Profile/api/index.js:
--------------------------------------------------------------------------------
1 | export const Notification = (status) => {
2 | return `/user/notification/${status}`;
3 | };
4 |
5 | export const userNotification = (id) => {
6 | return `/user/${id}`;
7 | };
8 |
9 | export function setFollower() {
10 | return "/config";
11 | }
12 |
--------------------------------------------------------------------------------
/src/modules/Home/actionsTypes/index.js:
--------------------------------------------------------------------------------
1 | export default {
2 | LIST_REQUEST: "LIST_REQUEST",
3 | LIST_SUCCESS: "LIST_SUCCESS",
4 | LIST_FAILED: "LIST_FAILED",
5 |
6 | GET_ONE_REQUEST: "GET_ONE_REQUEST",
7 | GET_ONE_SUCCESS: "GET_ONE_SUCCESS",
8 | GET_ONE_FAILED: "GET_ONE_FAILED",
9 | };
10 |
--------------------------------------------------------------------------------
/src/actions/adherentCardActions.js:
--------------------------------------------------------------------------------
1 | // Api
2 | // some endpoints
3 |
4 | // import actions types
5 |
6 | //lib
7 | import {SET_CURRENT_USER_ADHERENT_CARD} from "../actionsTypes";
8 |
9 | export const setUserAdherentCard = (payload) => ({
10 | type: SET_CURRENT_USER_ADHERENT_CARD,
11 | payload,
12 | });
13 |
--------------------------------------------------------------------------------
/ios/SNPINews.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
4 | networkTimeout=10000
5 | validateDistributionUrl=true
6 | zipStoreBase=GRADLE_USER_HOME
7 | zipStorePath=wrapper/dists
8 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/__tests__/App.test.tsx:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import React from 'react';
6 | import ReactTestRenderer from 'react-test-renderer';
7 | import App from '../App';
8 |
9 | test('renders correctly', async () => {
10 | await ReactTestRenderer.act(() => {
11 | ReactTestRenderer.create();
12 | });
13 | });
14 |
--------------------------------------------------------------------------------
/android/app/src/main/res/xml/network_security_config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/actions/notificationsPermissionsActions.js:
--------------------------------------------------------------------------------
1 | // Api
2 | // some endpoints
3 |
4 | // import actions types
5 |
6 | //lib
7 | import {SET_CURRENT_USER_NOTIFICATION_PERMISSION} from "../actionsTypes";
8 |
9 | export const setUserHasSentNotificationsPermission = (payload) => ({
10 | type: SET_CURRENT_USER_NOTIFICATION_PERMISSION,
11 | payload,
12 | });
--------------------------------------------------------------------------------
/metro.config.js:
--------------------------------------------------------------------------------
1 | const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
2 |
3 | /**
4 | * Metro configuration
5 | * https://reactnative.dev/docs/metro
6 | *
7 | * @type {import('@react-native/metro-config').MetroConfig}
8 | */
9 | const config = {};
10 |
11 | module.exports = mergeConfig(getDefaultConfig(__dirname), config);
12 |
--------------------------------------------------------------------------------
/src/scripts/ejectModule.js:
--------------------------------------------------------------------------------
1 | var fs = require('fs-extra');
2 | var path = require('path');
3 |
4 | try {
5 | const moduleName = 'Home';
6 | fs.copySync(
7 | path.join(process.cwd(), 'src', 'modules', moduleName),
8 | path.join(process.cwd(), 'src', 'modules', moduleName),
9 | );
10 | } catch (err) {
11 | console.log('Error: ' + err);
12 | }
13 |
--------------------------------------------------------------------------------
/src/modules/Profile/actionsTypes/index.js:
--------------------------------------------------------------------------------
1 | export default {
2 | NOTIFICATION_REQUEST: "NOTIFICATION_REQUEST",
3 | NOTIFICATION_SUCCESS: "NOTIFICATION_SUCCESS",
4 | NOTIFICATION_FAILED: "NOTIFICATION_FAILED",
5 |
6 | FOLLOWERS_REQUEST: "FOLLOWERS_REQUEST",
7 | FOLLOWERS_SUCCESS: "FOLLOWERS_SUCCESS",
8 | FOLLOWERS_FAILED: "FOLLOWERS_FAILED",
9 | };
10 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") }
2 | plugins { id("com.facebook.react.settings") }
3 | extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
4 | rootProject.name = 'snpiNews'
5 | include ':app'
6 | includeBuild('../node_modules/@react-native/gradle-plugin')
7 |
--------------------------------------------------------------------------------
/android/app/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/lib/shouldLogin.js:
--------------------------------------------------------------------------------
1 | // ...
2 | // import {Actions} from 'react-native-router-flux';
3 | import strings from 'config/strings';
4 |
5 | import { displayToast } from 'lib/interactions';
6 | import { navigate } from 'router/navigator';
7 |
8 | export default () => {
9 | displayToast(strings.pleaseLogin);
10 | // ...
11 | // Actions.Login();
12 | navigate("Login");
13 | };
14 |
--------------------------------------------------------------------------------
/src/lib/errorHandler.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Flexi Apps.
3 | *
4 | * Function to handle errors
5 | * Errors will be log in console in dev and sent to sentry server in prod
6 | */
7 |
8 | export default function reportError(from, error) {
9 | if (process.env.NODE_ENV === 'development') {
10 | console.log(from, error);
11 | } else {
12 | //todo: rollbar
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/modules/ForceUpdate/routes.js:
--------------------------------------------------------------------------------
1 | // ...
2 | // import {ActionConst} from 'react-native-router-flux';
3 |
4 | /*
5 | * Routing component (from modules folder)
6 | */
7 | import UpdtaeFromStore from './containers';
8 | const routes = [
9 | {
10 | key: 'ForceUpdate',
11 | component: UpdtaeFromStore,
12 | drawer: false,
13 | },
14 | ];
15 |
16 | export default routes;
17 |
--------------------------------------------------------------------------------
/src/modules/CheckAuth/routes.js:
--------------------------------------------------------------------------------
1 | // ...
2 | // import {ActionConst} from 'react-native-router-flux';
3 |
4 | /*
5 | * Routing component (from modules folder)
6 | */
7 | import CheckAuth from './index';
8 |
9 | const routes = [
10 | {
11 | key: 'CheckAuth',
12 | component: CheckAuth,
13 | // ...
14 | // type: ActionConst.RESET,
15 | initial: true,
16 | },
17 | ];
18 |
19 | export default routes;
20 |
--------------------------------------------------------------------------------
/src/modules/Auth/containers/homePage/index.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | import HomePageComponent from "./components";
4 |
5 | // Injectors
6 | import injectLocales from "utils/injectLocales";
7 |
8 | // import locales
9 | import fr from "../../locales/fr";
10 |
11 | const HomePage = (props) => {
12 | injectLocales({ fr });
13 | return ;
14 | };
15 |
16 | export default HomePage;
17 |
--------------------------------------------------------------------------------
/src/modules/ForceUpdate/containers/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | // the components
4 | import ForceUpdateComponent from './components';
5 |
6 | // Injectors
7 | import injectLocales from '../../../utils/injectLocales';
8 |
9 |
10 |
11 | // import locales
12 | import fr from '../locales/fr';
13 |
14 | const ForceUpdate = (props) => {
15 | injectLocales({fr});
16 | return ;
17 | };
18 |
19 | export default ForceUpdate;
20 |
--------------------------------------------------------------------------------
/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | SNPI
3 | DO_NOT_ASK_JAVASCRIPT
4 | ALWAYS_SEND
5 | 712374786310590
6 | fb712374786310590
7 |
8 |
--------------------------------------------------------------------------------
/src/utils/injectLocales.js:
--------------------------------------------------------------------------------
1 | import { useEffect } from 'react';
2 | import strings from 'config/strings';
3 |
4 | import { merge } from 'lodash';
5 |
6 | export default function injectLocales(locales) {
7 | const currentConfig = strings.getContent();
8 | const newContent = merge(currentConfig, locales);
9 |
10 | strings.setContent(newContent);
11 | }
12 |
13 | export function useInjectLocales(locales) {
14 | useEffect(() => {
15 | injectLocales(locales);
16 | }, [locales]);
17 | }
18 |
--------------------------------------------------------------------------------
/src/modules/Home/routes.js:
--------------------------------------------------------------------------------
1 | // ...
2 | // import {ActionConst} from 'react-native-router-flux';
3 |
4 | /*
5 | * Routing component (from modules folder)
6 | */
7 | import Details from "../Home/containers/Details";
8 | import Profile from "../Profile/containers/compte";
9 |
10 | const routes = [
11 | {
12 | key: "Details",
13 | component: Details,
14 | drawer: false,
15 | },
16 | {
17 | key: "Profile",
18 | component: Profile,
19 | drawer: false,
20 | },
21 | ];
22 |
23 | export default routes;
24 |
--------------------------------------------------------------------------------
/ios/.xcode.env:
--------------------------------------------------------------------------------
1 | # This `.xcode.env` file is versioned and is used to source the environment
2 | # used when running script phases inside Xcode.
3 | # To customize your local environment, you can create an `.xcode.env.local`
4 | # file that is not versioned.
5 |
6 | # NODE_BINARY variable contains the PATH to the node executable.
7 | #
8 | # Customize the NODE_BINARY variable here.
9 | # For example, to use nvm with brew, add the following line
10 | # . "$(brew --prefix nvm)/nvm.sh" --no-use
11 | export NODE_BINARY=$(command -v node)
12 |
--------------------------------------------------------------------------------
/src/config/languages.js:
--------------------------------------------------------------------------------
1 | import strings from './strings';
2 |
3 | const languages = [
4 | {
5 | name: strings.fr,
6 | value: 'fr',
7 | },
8 | {
9 | name: strings.ar,
10 | value: 'ar',
11 | },
12 | ];
13 |
14 | export const getDefaultLang = () => {
15 | const current = strings.getInterfaceLanguage().split('-')[0];
16 | const language = languages.find((one) => one.value === current);
17 | console.log('default language', language);
18 | return language || languages[0];
19 | };
20 |
21 | export default languages;
22 |
--------------------------------------------------------------------------------
/src/utils/checkStore.js:
--------------------------------------------------------------------------------
1 | import {conformsTo, isFunction, isObject} from 'lodash';
2 | import invariant from 'invariant';
3 |
4 | /**
5 | * Validate the shape of redux store
6 | */
7 | export default function checkStore(store) {
8 | const shape = {
9 | dispatch: isFunction,
10 | subscribe: isFunction,
11 | getState: isFunction,
12 | replaceReducer: isFunction,
13 | injectedReducers: isObject,
14 | };
15 | invariant(
16 | conformsTo(store, shape),
17 | '(src/utils...) injectors: Expected a valid redux store',
18 | );
19 | }
20 |
--------------------------------------------------------------------------------
/src/store/index.js:
--------------------------------------------------------------------------------
1 | import { createStore, applyMiddleware, compose, combineReducers } from 'redux';
2 | import { configureStore } from "@reduxjs/toolkit";
3 | import reducers from '../reducers';
4 | import promiseMiddleware from 'redux-promise';
5 |
6 | const rootReducer = combineReducers(
7 | Object.keys(reducers).length ? reducers : { dummy: () => ({}) }
8 | );
9 |
10 | const enhancer = compose(applyMiddleware(promiseMiddleware));
11 |
12 | const store = configureStore({
13 | reducer: rootReducer,
14 | devTools: true
15 | });
16 |
17 | export default store;
18 |
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 |
3 | # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4 | ruby ">= 2.6.10"
5 |
6 | # Exclude problematic versions of cocoapods and activesupport that causes build failures.
7 | gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
8 | gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
9 | gem 'xcodeproj', '< 1.26.0'
10 | gem 'concurrent-ruby', '< 1.3.4'
11 |
12 | # Ruby 3.4.0 has removed some libraries from the standard library.
13 | gem 'bigdecimal'
14 | gem 'logger'
15 | gem 'benchmark'
16 | gem 'mutex_m'
17 |
--------------------------------------------------------------------------------
/android/app/src/main/res/layout/launch_screen.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
14 |
--------------------------------------------------------------------------------
/src/modules/Auth/components/cguText/styles.js:
--------------------------------------------------------------------------------
1 | import styles from 'styles';
2 | import colors from 'colors';
3 |
4 | const {DeviceWidth, FontFamily} = styles;
5 |
6 | import {ScaledSheet} from 'react-native-size-matters/extend';
7 |
8 | export default ScaledSheet.create({
9 | cguText: {
10 | fontSize: '9@ms0.3',
11 | marginHorizontal: DeviceWidth * 0.1,
12 | lineHeight: '18@vs',
13 | fontFamily: FontFamily.nextRegular,
14 | color: colors.black_one,
15 | textAlign: 'left',
16 | },
17 | blueCguText: {
18 | color: colors.blue_one,
19 | },
20 | });
21 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
9 |
13 |
14 |
--------------------------------------------------------------------------------
/src/router/routingConfig.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Routing component (from modules folder)
3 | */
4 | import checkauthRoutes from "../modules/CheckAuth/routes.js";
5 | import authRoutes from "../modules/Auth/routes.js";
6 | import homeRoutes from "../modules/Home/routes.js";
7 | import profileRoutes from "../modules/Profile/route";
8 | import ForceUpdateRoutes from "../modules/ForceUpdate/routes";
9 | export default function configureRoutes() {
10 | const routes = [
11 | ...checkauthRoutes,
12 | ...authRoutes,
13 | ...homeRoutes,
14 | ...profileRoutes,
15 | ...ForceUpdateRoutes,
16 | ];
17 |
18 | return routes;
19 | }
20 |
--------------------------------------------------------------------------------
/src/lib/abortController.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | import AbortController from 'abort-controller';
3 |
4 | var abortController = (function() {
5 | // Instance stores a reference to the Singleton
6 | var controller;
7 |
8 | function init() {
9 | // Singleton
10 | return new AbortController();
11 | }
12 |
13 | return {
14 | // Get the Singleton instance if one exists
15 | // or create one if it doesn't
16 | getInstance: function() {
17 | if (!controller) {
18 | controller = init();
19 | }
20 |
21 | return controller;
22 | },
23 | };
24 | })();
25 |
26 | export default abortController;
27 |
--------------------------------------------------------------------------------
/src/router/NavigationService.js:
--------------------------------------------------------------------------------
1 | import {NavigationActions} from '@react-navigation/native';
2 |
3 | let _navigator;
4 | const setTopLevelNavigator = navigatorRef => {
5 | _navigator = navigatorRef;
6 | };
7 | const navigate = (routeName, params) => {
8 | // console.log(routeName)
9 | _navigator.dispatch(
10 | NavigationActions.navigate({
11 | type: NavigationActions.NAVIGATE,
12 | routeName,
13 | params,
14 | }),
15 | );
16 | };
17 |
18 | // add other navigation functions that you need and export themexport default { navigate, setTopLevelNavigator,};
19 | export default {
20 | navigate,
21 | setTopLevelNavigator,
22 | };
23 |
--------------------------------------------------------------------------------
/src/modules/Profile/route.js:
--------------------------------------------------------------------------------
1 | // ...
2 | // import { ActionConst } from "react-native-router-flux";
3 |
4 | /*
5 | * Routing component (from modules folder)
6 | */
7 | import Notifications from "./containers/notifications";
8 | import Abonnements from "./containers/followers";
9 | import Card from "./containers/card";
10 |
11 | const routes = [
12 | {
13 | key: "Notifications",
14 | component: Notifications,
15 | drawer: false,
16 | },
17 | {
18 | key: "Abonnements",
19 | component: Abonnements,
20 | drawer: false,
21 | },
22 | {
23 | key: "Card",
24 | component: Card,
25 | drawer: false,
26 | },
27 | ];
28 |
29 | export default routes;
30 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext {
3 | buildToolsVersion = "35.0.0"
4 | minSdkVersion = 24
5 | compileSdkVersion = 35
6 | targetSdkVersion = 35
7 | // ndkVersion = "27.1.12297006"
8 | ndkVersion = "26.1.10909125"
9 | kotlinVersion = "2.1.20"
10 | }
11 | repositories {
12 | google()
13 | mavenCentral()
14 | }
15 | dependencies {
16 | classpath("com.android.tools.build:gradle")
17 | classpath("com.facebook.react:react-native-gradle-plugin")
18 | classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
19 | }
20 | }
21 |
22 | apply plugin: "com.facebook.react.rootproject"
23 |
--------------------------------------------------------------------------------
/android/app/build_defs.bzl:
--------------------------------------------------------------------------------
1 | """Helper definitions to glob .aar and .jar targets"""
2 |
3 | def create_aar_targets(aarfiles):
4 | for aarfile in aarfiles:
5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
6 | lib_deps.append(":" + name)
7 | android_prebuilt_aar(
8 | name = name,
9 | aar = aarfile,
10 | )
11 |
12 | def create_jar_targets(jarfiles):
13 | for jarfile in jarfiles:
14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
15 | lib_deps.append(":" + name)
16 | prebuilt_jar(
17 | name = name,
18 | binary_jar = jarfile,
19 | )
20 |
--------------------------------------------------------------------------------
/src/modules/Auth/actionsTypes/index.js:
--------------------------------------------------------------------------------
1 | export const LOGIN_REQUEST = 'LOGIN_REQUEST';
2 | export const LOGIN_SUCCESS = 'LOGIN_SUCCESS';
3 | export const LOGIN_FAILURE = 'LOGIN_FAILURE';
4 |
5 | export const PASSWORD_REQUEST = 'PASSWORD_REQUEST';
6 | export const PASSWORD_SUCCESS = 'PASSWORD_SUCCESS';
7 | export const PASSWORD_FAILURE = 'PASSWORD_FAILURE';
8 |
9 | export const SIGNUP_REQUEST = 'SIGNUP_REQUEST';
10 | export const SIGNUP_SUCCESS = 'SIGNUP_SUCCESS';
11 | export const SIGNUP_FAILURE = 'SIGNUP_FAILURE';
12 |
13 | export const UPLOAD_FILE_REQUEST = 'UPLOAD_FILE_REQUEST';
14 | export const UPLOAD_FILE_SECCESS = 'UPLOAD_FILE_SECCESS';
15 | export const UPLOAD_FILE_FAILURE = 'UPLOAD_FILE_FAILURE';
16 |
--------------------------------------------------------------------------------
/src/modules/Auth/components/cguText/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {Text} from 'react-native';
3 | import strings from '../../../../config/strings';
4 |
5 | import styles from './styles';
6 |
7 | const cgu = () => (
8 |
9 | {strings.cguContinue}{' '}
10 | alert('PRESS CGU')}>
13 | {strings.cgu}
14 | {' '}
15 | {strings.politicsRead}{' '}
16 | alert('PRESS PC')}>
19 | {strings.po}{' '}
20 |
21 |
22 | );
23 |
24 | export default cgu;
25 |
--------------------------------------------------------------------------------
/src/modules/Auth/containers/resetPassword/index.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import ResetPasswordComponent from "./components";
3 | import { connect } from "react-redux";
4 | import { bindActionCreators } from "redux";
5 |
6 | // redux action
7 | import * as actions from "../../../../modules/Auth/actions";
8 |
9 |
10 |
11 |
12 | const ResetPassword = (props) => {
13 | return ;
14 | };
15 |
16 | const mapStateToProps = ({ auth, global }) => ({
17 | auth
18 | });
19 |
20 | const mapDispatchToProps = (dispatch) => ({
21 | actions: bindActionCreators({ ...actions }, dispatch),
22 | });
23 |
24 | export default connect(mapStateToProps, mapDispatchToProps)(ResetPassword);
25 |
--------------------------------------------------------------------------------
/src/modules/Auth/components/Switcher/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {View, Text, TouchableOpacity} from 'react-native';
3 |
4 | //styles
5 | import styles from './styles';
6 |
7 | const Switcher = (props) => {
8 | return (
9 |
10 | {props.value === props.values[0] ? (
11 | <>
12 |
13 | {props.value}
14 | >
15 | ) : (
16 | <>
17 | {props.value}
18 |
19 | >
20 | )}
21 |
22 | );
23 | };
24 |
25 | export default Switcher;
26 |
--------------------------------------------------------------------------------
/src/modules/Profile/locales/fr.js:
--------------------------------------------------------------------------------
1 | export default {
2 | count: "Mon compte",
3 | followers: "Mes abonnements",
4 | subscriptionsCard: "Ma carte adhérent",
5 | notifications: "Notifications",
6 | CGU: "Conditions générales d'utilisation",
7 | description:
8 | "Vous ne pouvez pas modifier votre compte sur l'application, pour toute modification rendez-vous sur l'espace adhérent : ",
9 | logout: "Déconnexion",
10 | publish_new_articl: "Publication d'un nouvel article",
11 | follow_all: "Suivre toutes les actualités",
12 | actuality_theme: "THÈMES D'ACTUALITÉS",
13 | infos: "Infos juridiques",
14 | podacts: "Podacts",
15 | observatoire: "L'Observatoire",
16 | flash_infos: "Flash Infos",
17 | covid: "Covid",
18 | formation: "Formation",
19 | };
20 |
--------------------------------------------------------------------------------
/src/reducers/notificationsPermissionsReducer.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | import {SET_CURRENT_USER_NOTIFICATION_PERMISSION} from "../actionsTypes";
4 |
5 | /**
6 | * ## InitialState
7 | *
8 | * The fields we're concerned with
9 | */
10 | const initialState = {
11 | hasSentNotificationPermissionData: false,
12 | };
13 |
14 | /**
15 | * ## Reducer function
16 | * @param {Object} state - initialState
17 | * @param {Object} action - type and payload
18 | */
19 | export default function notificationsPermissionsReducer(state = initialState, action) {
20 | switch (action.type) {
21 | case SET_CURRENT_USER_NOTIFICATION_PERMISSION:
22 | return {
23 | ...state,
24 | hasSentNotificationPermissionData: true,
25 | };
26 | default:
27 | return state;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/actionsTypes/globalTypes.js:
--------------------------------------------------------------------------------
1 | // CONFIGURE REDUX ACTIONS TYPES
2 |
3 | export const SET_CURRENT_USER = "SET_CURRENT_USER";
4 |
5 | export const SET_ONE_SIGNAL_ID = "SET_ONE_SIGNAL_ID";
6 | export const SET_SELECTED_LANGUAGE = "SET_SELECTED_LANGUAGE"; // to change language in the app
7 |
8 | export const SET_IS_GUEST = "SET_IS_GUEST";
9 |
10 | export const LOGOUT_SUCCESS = "LOGOUT_SUCCESS";
11 |
12 | export const SET_USER_CONVER = "SET_USER_CONVER";
13 |
14 | export const REFRESH_REQUEST = "REFRESH_REQUEST";
15 | export const REFRESH_SUCCESS = "REFRESH_SUCCESS";
16 | export const REFRESH_FAILED = "REFRESH_FAILED";
17 |
18 | export const SET_CURRENT_USER_NOTIFICATION_PERMISSION = "SET_CURRENT_USER_NOTIFICATION_PERMISSION";
19 |
20 | export const SET_CURRENT_USER_ADHERENT_CARD = "SET_CURRENT_USER_ADHERENT_CARD";
21 |
--------------------------------------------------------------------------------
/src/modules/Auth/components/authHeader/styles.js:
--------------------------------------------------------------------------------
1 | import styles from 'styles';
2 | import colors from 'colors';
3 |
4 | const {FontFamily} = styles;
5 |
6 | import {ScaledSheet} from 'react-native-size-matters/extend';
7 | import {I18nManager} from 'react-native';
8 |
9 | export default ScaledSheet.create({
10 | container: {
11 | paddingTop: '18@vs',
12 | paddingBottom: '18@vs',
13 | flexDirection: 'row',
14 | justifyContent: 'space-between',
15 | alignItems: 'center',
16 | paddingRight: '9@s',
17 | },
18 | backImage: {
19 | height: '30@vs',
20 | width: '30@s',
21 | marginLeft: '18@s',
22 | transform: [{scaleX: I18nManager.isRTL ? -1 : 1}],
23 | },
24 | title: {
25 | fontSize: '22@ms0.3',
26 | color: colors.orange_one,
27 | fontFamily: FontFamily.nextSemiBold,
28 | },
29 | });
30 |
--------------------------------------------------------------------------------
/android/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | SNPINews
4 | Project android created by Buildship.
5 |
6 |
7 |
8 |
9 | org.eclipse.buildship.core.gradleprojectbuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.buildship.core.gradleprojectnature
16 |
17 |
18 |
19 | 0
20 |
21 | 30
22 |
23 | org.eclipse.core.resources.regexFilterMatcher
24 | node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/src/hooks/useKeyboardAware.js:
--------------------------------------------------------------------------------
1 | import {useState, useEffect} from 'react';
2 | import {Keyboard} from 'react-native';
3 |
4 | export default function useKeyboardAware() {
5 | const [display, setDisplay] = useState(true);
6 |
7 | useEffect(() => {
8 | const _keyboardDidShow = () => {
9 | setDisplay(false);
10 | };
11 |
12 | const _keyboardDidHide = () => {
13 | setDisplay(true);
14 | };
15 |
16 | let keyboardDidShowListener = Keyboard.addListener(
17 | 'keyboardDidShow',
18 | _keyboardDidShow,
19 | );
20 |
21 | let keyboardDidHideListener = Keyboard.addListener(
22 | 'keyboardDidHide',
23 | _keyboardDidHide,
24 | );
25 |
26 | return () => {
27 | keyboardDidShowListener.remove();
28 | keyboardDidHideListener.remove();
29 | };
30 | }, []);
31 |
32 | return display;
33 | }
34 |
--------------------------------------------------------------------------------
/src/modules/Auth/containers/Login/index.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { connect } from "react-redux";
3 | import { bindActionCreators } from "redux";
4 |
5 | import LoginComponent from "./components";
6 |
7 | // Injectors
8 | import injectLocales from "utils/injectLocales";
9 |
10 | // redux action
11 | import * as actions from "modules/Auth/actions";
12 |
13 |
14 | // import locales
15 | import fr from "locales/fr";
16 |
17 | const Login = (props) => {
18 | injectLocales({ fr });
19 | return ;
20 | };
21 |
22 | const mapStateToProps = ({ auth, global }) => ({
23 | auth,
24 | // oneSignalPlayerId: global.oneSignalPlayerId,
25 | });
26 |
27 | const mapDispatchToProps = (dispatch) => ({
28 | actions: bindActionCreators({ ...actions }, dispatch),
29 | });
30 |
31 | export default connect(mapStateToProps, mapDispatchToProps)(Login);
32 |
--------------------------------------------------------------------------------
/src/modules/Profile/containers/notifications/index.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | import Components from "./components";
4 |
5 | // Injectors
6 | import injectLocales from "utils/injectLocales";
7 |
8 |
9 | // import locales
10 | import fr from "locales/fr";
11 |
12 | //
13 | import { connect } from "react-redux";
14 | import { bindActionCreators } from "redux";
15 |
16 | // redux action
17 | import * as actions from "modules/Profile/actions";
18 |
19 |
20 | const Page = (props) => {
21 | injectLocales({ fr });
22 | return ;
23 | };
24 | const mapStateToProps = ({ auth, global }) => ({
25 | auth,
26 | // oneSignalPlayerId: global.oneSignalPlayerId,
27 | });
28 | const mapDispatchToProps = (dispatch) => ({
29 | actions: bindActionCreators({ ...actions }, dispatch),
30 | });
31 |
32 | export default connect(mapStateToProps, mapDispatchToProps)(Page);
33 |
--------------------------------------------------------------------------------
/src/modules/Home/containers/Details/index.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | import DetailsComponents from "./components";
4 |
5 | // Injectors
6 | import injectLocales from "utils/injectLocales";
7 |
8 |
9 | // import locales
10 | import fr from "locales/fr";
11 |
12 | //
13 | import { connect } from "react-redux";
14 | import { bindActionCreators } from "redux";
15 |
16 | // redux action
17 | import * as actions from "modules/Auth/actions";
18 |
19 | const DetailsPage = (props) => {
20 | injectLocales({ fr });
21 | return ;
22 | };
23 | const mapStateToProps = ({ auth, global }) => ({
24 | auth,
25 | // oneSignalPlayerId: global.oneSignalPlayerId,
26 | });
27 | const mapDispatchToProps = (dispatch) => ({
28 | actions: bindActionCreators({ ...actions }, dispatch),
29 | });
30 |
31 | export default connect(mapStateToProps, mapDispatchToProps)(DetailsPage);
32 |
--------------------------------------------------------------------------------
/src/modules/Home/containers/Home/index.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | import ListPageComponents from "./components";
4 |
5 | // Injectors
6 | import injectLocales from "utils/injectLocales";
7 |
8 |
9 | // import locales
10 | import fr from "locales/fr";
11 |
12 | //
13 | import { connect } from "react-redux";
14 | import { bindActionCreators } from "redux";
15 |
16 | // redux action
17 | import * as actions from "modules/Auth/actions";
18 |
19 |
20 | const ListPage = (props) => {
21 | injectLocales({ fr });
22 | return ;
23 | };
24 | const mapStateToProps = ({ auth, global }) => ({
25 | auth,
26 | // oneSignalPlayerId: global.oneSignalPlayerId,
27 | });
28 | const mapDispatchToProps = (dispatch) => ({
29 | actions: bindActionCreators({ ...actions }, dispatch),
30 | });
31 |
32 | export default connect(mapStateToProps, mapDispatchToProps)(ListPage);
33 |
--------------------------------------------------------------------------------
/src/modules/Profile/containers/card/index.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | import FollowersComponents from "./components";
4 |
5 | // Injectors
6 | import injectLocales from "utils/injectLocales";
7 |
8 | // import locales
9 | import fr from "locales/fr";
10 |
11 | //
12 | import { connect } from "react-redux";
13 | import { bindActionCreators } from "redux";
14 |
15 | // redux action
16 | import * as actions from "modules/Profile/actions";
17 |
18 |
19 | const CardPage = (props) => {
20 | injectLocales({ fr });
21 | return ;
22 | };
23 | const mapStateToProps = ({ auth, global }) => ({
24 | auth,
25 | // oneSignalPlayerId: global.oneSignalPlayerId,
26 | });
27 | const mapDispatchToProps = (dispatch) => ({
28 | actions: bindActionCreators({ ...actions }, dispatch),
29 | });
30 |
31 | export default connect(mapStateToProps, mapDispatchToProps)(CardPage);
32 |
--------------------------------------------------------------------------------
/src/modules/Profile/containers/compte/index.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | import ProfileComponents from "./components";
4 |
5 | // Injectors
6 | import injectLocales from "utils/injectLocales";
7 |
8 |
9 | // import locales
10 | import fr from "locales/fr";
11 |
12 | //
13 | import { connect } from "react-redux";
14 | import { bindActionCreators } from "redux";
15 |
16 | // redux action
17 | import * as actions from "modules/Profile/actions";
18 |
19 |
20 | const ProfilePage = (props) => {
21 | injectLocales({ fr });
22 | return ;
23 | };
24 | const mapStateToProps = ({ auth, global }) => ({
25 | auth,
26 | // oneSignalPlayerId: global.oneSignalPlayerId,
27 | });
28 | const mapDispatchToProps = (dispatch) => ({
29 | actions: bindActionCreators({ ...actions }, dispatch),
30 | });
31 |
32 | export default connect(mapStateToProps, mapDispatchToProps)(ProfilePage);
33 |
--------------------------------------------------------------------------------
/src/modules/Profile/containers/followers/index.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | import FollowersComponents from "./components";
4 |
5 | // Injectors
6 | import injectLocales from "utils/injectLocales";
7 |
8 |
9 | // import locales
10 | import fr from "locales/fr";
11 |
12 | //
13 | import { connect } from "react-redux";
14 | import { bindActionCreators } from "redux";
15 |
16 | // redux action
17 | import * as actions from "modules/Profile/actions";
18 |
19 |
20 | const FollowersPage = (props) => {
21 | injectLocales({ fr });
22 | return ;
23 | };
24 | const mapStateToProps = ({ auth, global }) => ({
25 | auth,
26 | // oneSignalPlayerId: global.oneSignalPlayerId,
27 | });
28 | const mapDispatchToProps = (dispatch) => ({
29 | actions: bindActionCreators({ ...actions }, dispatch),
30 | });
31 |
32 | export default connect(mapStateToProps, mapDispatchToProps)(FollowersPage);
33 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
2 | patreon: # Replace with a single Patreon username
3 | open_collective: # Replace with a single Open Collective username
4 | ko_fi: # Replace with a single Ko-fi username
5 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
6 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
7 | liberapay: # Replace with a single Liberapay username
8 | issuehunt: # Replace with a single IssueHunt username
9 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
10 | polar: # Replace with a single Polar username
11 | buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
12 | thanks_dev: # Replace with a single thanks.dev username
13 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
14 |
--------------------------------------------------------------------------------
/src/services/ga-api.js:
--------------------------------------------------------------------------------
1 | const url = 'https://www.google-analytics.com/mp/collect?measurement_id=G-SMHX9TM9RZ&api_secret=wIoFJuDmQUCR4uP3terZ4w';
2 |
3 | export let loadAppAlreadyCalled = false;
4 | export default function gaSendLoadAppEvent(clientId, eventName, params = {}) {
5 |
6 | const data = {
7 | client_id: clientId,
8 | events: [{
9 | name: eventName,
10 | params: params
11 | }]
12 | };
13 |
14 | const options = {
15 | method: 'POST',
16 | headers: {
17 | 'Content-Type': 'application/json'
18 | },
19 | body: JSON.stringify(data)
20 | };
21 |
22 | fetch(url, options)
23 | .then(response => {
24 | loadAppAlreadyCalled = true;
25 | //console.debug('gaSendLoadAppEvent SUCCESS : ', response ?? "SUCESS NO RESPONSE");
26 | })
27 | .catch(error => {
28 | console.debug('gaSendLoadAppEvent ERROR : ', error ?? "ERROR NO DETAIL");
29 | });
30 | }
31 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/snpinews/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.snpinews
2 |
3 | import com.facebook.react.ReactActivity
4 | import com.facebook.react.ReactActivityDelegate
5 | import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
6 | import com.facebook.react.defaults.DefaultReactActivityDelegate
7 |
8 | class MainActivity : ReactActivity() {
9 |
10 | /**
11 | * Returns the name of the main component registered from JavaScript. This is used to schedule
12 | * rendering of the component.
13 | */
14 | override fun getMainComponentName(): String = "snpiNews"
15 |
16 | /**
17 | * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
18 | * which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
19 | */
20 | override fun createReactActivityDelegate(): ReactActivityDelegate =
21 | DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
22 | }
23 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@react-native/typescript-config",
3 | "compilerOptions": {
4 | "baseUrl": "src",
5 | "paths": {
6 | "assets/*": ["assets/*"],
7 | "common/*": ["common/*"],
8 | "styles/*": ["common/styles/*"],
9 | "colors/*": ["common/colors/*"],
10 | "components/*": ["common/components/*"],
11 | "config/*": ["config/*"],
12 | "actions/*": ["actions/*"],
13 | "actionsTypes/*": ["actionsTypes/*"],
14 | "api/*": ["api/*"],
15 | "contextProviders/*": ["contextProviders/*"],
16 | "hooks/*": ["hooks/*"],
17 | "lib/*": ["lib/*"],
18 | "locales/*": ["locales/*"],
19 | "modules/*": ["modules/*"],
20 | "reducers/*": ["reducers/*"],
21 | "router/*": ["router/*"],
22 | "scripts/*": ["scripts/*"],
23 | "services/*": ["services/*"],
24 | "store/*": ["store/*"],
25 | "utils/*": ["utils/*"]
26 | }
27 | },
28 | "include": ["src"],
29 | "exclude": ["node_modules"]
30 | }
31 |
--------------------------------------------------------------------------------
/android/app/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | app
4 | Project app created by Buildship.
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.buildship.core.gradleprojectbuilder
15 |
16 |
17 |
18 |
19 |
20 | org.eclipse.jdt.core.javanature
21 | org.eclipse.buildship.core.gradleprojectnature
22 |
23 |
24 |
25 | 1634574195930
26 |
27 | 30
28 |
29 | org.eclipse.core.resources.regexFilterMatcher
30 | node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/src/contextProviders/NetworkProvider/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import NetInfo from '@react-native-community/netinfo';
3 | import {ReactReduxContext} from 'react-redux';
4 |
5 | export const NetworkContext = React.createContext({isConnected: true});
6 |
7 | export class NetworkProvider extends React.PureComponent {
8 | state = {
9 | isConnected: true,
10 | };
11 |
12 | static contextType = ReactReduxContext;
13 |
14 | componentDidMount() {
15 | // Subscribe
16 | const unsubscribe = NetInfo.addEventListener(state => {
17 | console.log('Connection type', state.type);
18 | console.log('Is connected?', state.isConnected);
19 | this.handleConnectivityChange(state.isConnected);
20 | });
21 |
22 | // Unsubscribe
23 | unsubscribe();
24 | }
25 |
26 | handleConnectivityChange = isConnected => this.setState({isConnected});
27 |
28 | render() {
29 | return (
30 |
31 | {this.props.children}
32 |
33 | );
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/modules/Auth/routes.js:
--------------------------------------------------------------------------------
1 | // ...
2 | // import { ActionConst } from "react-native-router-flux";
3 |
4 | /*
5 | * Routing component (from modules folder)
6 | */
7 | import Login from "./containers/Login";
8 | import ResetPassword from "./containers/resetPassword";
9 | import PasswordMessage from "./containers/passwordMessage";
10 | import Home from "./containers/homePage";
11 | import List from "../Home/containers/Home";
12 | const routes = [
13 | {
14 | key: "Login",
15 | component: Login,
16 | drawer: false,
17 | },
18 | {
19 | key: "ResetPassword",
20 | component: ResetPassword,
21 | drawer: false,
22 | hideNavBar: true,
23 | },
24 | {
25 | key: "PasswordMessage",
26 | component: PasswordMessage,
27 | drawer: false,
28 | hideNavBar: true,
29 | },
30 | {
31 | key: "FirstView",
32 | component: Home,
33 | drawer: false,
34 | hideNavBar: true,
35 | },
36 | {
37 | key: "List",
38 | component: List,
39 | drawer: false,
40 | hideNavBar: true,
41 | },
42 | ];
43 |
44 | export default routes;
45 |
--------------------------------------------------------------------------------
/src/modules/Auth/components/Switcher/styles.js:
--------------------------------------------------------------------------------
1 | import styles from 'styles';
2 | import colors from 'colors';
3 |
4 | const {FontFamily} = styles;
5 |
6 | import {ScaledSheet} from 'react-native-size-matters/extend';
7 |
8 | export default ScaledSheet.create({
9 | container: {
10 | height: '40@vs',
11 | width: '123@s',
12 | backgroundColor: colors.orange_one,
13 | alignItems: 'center',
14 | borderRadius: '20@s',
15 | flexDirection: 'row',
16 | marginBottom: '27@vs',
17 | alignSelf: 'center',
18 | },
19 | ballSwitcher: {
20 | width: '40@s',
21 | height: '40@s',
22 | backgroundColor: colors.grey_Seven,
23 | borderRadius: '20@s',
24 | shadowColor: '#000',
25 | shadowOffset: {
26 | width: 0,
27 | height: 2,
28 | },
29 | shadowOpacity: 0.25,
30 | shadowRadius: 3.84,
31 |
32 | elevation: 5,
33 | },
34 | text: {
35 | marginLeft: '9@s',
36 | color: colors.white,
37 | fontSize: '14@ms0.3',
38 | fontFamily: FontFamily.nextSemiBold,
39 | flex: 1,
40 | textAlign: 'left',
41 | },
42 | });
43 |
--------------------------------------------------------------------------------
/src/modules/Auth/containers/passwordMessage/components/styles.js:
--------------------------------------------------------------------------------
1 | import styles from 'styles';
2 | import colors from 'colors';
3 |
4 | const {FontFamily, FontSize} = styles;
5 |
6 | import {ScaledSheet} from 'react-native-size-matters/extend';
7 |
8 | export default ScaledSheet.create({
9 | container: {
10 | flex: 1,
11 | },
12 |
13 | ButtonContainer: {
14 | flex: 1,
15 | justifyContent: 'flex-end',
16 | paddingBottom: '29@vs',
17 | },
18 | closeButton: {
19 | height: '24@vs',
20 | width: '24@s',
21 | },
22 | closeButtonContainer: {
23 | alignSelf: 'flex-end',
24 | marginTop: '10@vs',
25 | marginRight: '29@s',
26 | },
27 | messageText: {
28 | fontSize: FontSize.f25,
29 | fontFamily: FontFamily.nextSemiBold,
30 | color: colors.blue_one,
31 | width: '261@s',
32 | textAlign: 'center',
33 | alignSelf: 'center',
34 | marginTop: '66@vs',
35 | lineHeight: '31@vs',
36 | },
37 | passwordMessage: {
38 | height: '200@vs',
39 | width: '200@s',
40 | alignSelf: 'center',
41 | marginTop: '79@vs',
42 | },
43 | });
44 |
--------------------------------------------------------------------------------
/src/utils/injectReducers.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import hoistNonReactStatics from 'hoist-non-react-statics';
3 | import {ReactReduxContext} from 'react-redux';
4 |
5 | import getInjectors from './reducerInjectors';
6 |
7 | /**
8 | * Dynamically injects a reducer
9 | *
10 | * @param {string} key A key of the reducer
11 | * @param {function} reducer A reducer that will be injected
12 | *
13 | */
14 | export default ({key, reducer}) => WrappedComponent => {
15 | class ReducerInjector extends React.Component {
16 | static WrappedComponent = WrappedComponent;
17 |
18 | static contextType = ReactReduxContext;
19 |
20 | static displayName = `withReducer(${WrappedComponent.displayName ||
21 | WrappedComponent.name ||
22 | 'Component'})`;
23 |
24 | constructor(props, context) {
25 | super(props, context);
26 |
27 | getInjectors(context.store).injectReducer(key, reducer);
28 | }
29 |
30 | render() {
31 | return ;
32 | }
33 | }
34 |
35 | return hoistNonReactStatics(ReducerInjector, WrappedComponent);
36 | };
37 |
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: ['module:@react-native/babel-preset'],
3 | plugins: [
4 | [
5 | 'module-resolver',
6 | {
7 | root: ['./src'],
8 | alias: {
9 | assets: './src/assets',
10 | common: './src/common',
11 | styles: './src/common/styles',
12 | colors: './src/common/colors',
13 | components: './src/common/components',
14 | config: './src/config',
15 | actions: './src/actions',
16 | actionsTypes: './src/actionsTypes',
17 | api: './src/api',
18 | contextProviders: './src/contextProviders',
19 | hooks: './src/hooks',
20 | lib: './src/lib',
21 | locales: './src/locales',
22 | modules: './src/modules',
23 | reducers: './src/reducers',
24 | router: './src/router',
25 | scripts: './src/scripts',
26 | services: './src/services',
27 | store: './src/store',
28 | utils: './src/utils',
29 | },
30 | extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'],
31 | },
32 | ],
33 | ],
34 | };
35 |
--------------------------------------------------------------------------------
/ios/SNPINews/PrivacyInfo.xcprivacy:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | NSPrivacyAccessedAPITypes
6 |
7 |
8 | NSPrivacyAccessedAPIType
9 | NSPrivacyAccessedAPICategoryFileTimestamp
10 | NSPrivacyAccessedAPITypeReasons
11 |
12 | C617.1
13 |
14 |
15 |
16 | NSPrivacyAccessedAPIType
17 | NSPrivacyAccessedAPICategoryUserDefaults
18 | NSPrivacyAccessedAPITypeReasons
19 |
20 | CA92.1
21 |
22 |
23 |
24 | NSPrivacyAccessedAPIType
25 | NSPrivacyAccessedAPICategorySystemBootTime
26 | NSPrivacyAccessedAPITypeReasons
27 |
28 | 35F9.1
29 |
30 |
31 |
32 | NSPrivacyCollectedDataTypes
33 |
34 | NSPrivacyTracking
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/src/modules/Auth/components/authHeader/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { View, Text, Image, TouchableOpacity } from 'react-native';
3 |
4 | //styles
5 | import styles from './styles';
6 | import { useNavigation } from '@react-navigation/native';
7 |
8 | //lib
9 | // ...
10 | // import {Actions} from 'react-native-router-flux';
11 |
12 | const AuthHeader = (props) => {
13 | const navigation = useNavigation();
14 | return (
15 |
16 | {
17 | // ...
18 | // Actions.pop()
19 | navigation.goBack();
20 | }}>
21 |
26 |
27 | {props.title && (
28 | {
29 | // ...
30 | // Actions.pop()
31 | navigation.goBack();
32 | }}>
33 | {props.title}
34 |
35 | )}
36 |
37 | );
38 | };
39 |
40 | export default AuthHeader;
41 |
--------------------------------------------------------------------------------
/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Resolve react_native_pods.rb with node to allow for hoisting
2 | require Pod::Executable.execute_command('node', ['-p',
3 | 'require.resolve(
4 | "react-native/scripts/react_native_pods.rb",
5 | {paths: [process.argv[1]]},
6 | )', __dir__]).strip
7 |
8 | platform :ios, min_ios_version_supported
9 | prepare_react_native_project!
10 |
11 | linkage = ENV['USE_FRAMEWORKS']
12 | if linkage != nil
13 | Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
14 | use_frameworks! :linkage => linkage.to_sym
15 | end
16 |
17 | target 'snpiNews' do
18 | config = use_native_modules!
19 |
20 | use_react_native!(
21 | :path => config[:reactNativePath],
22 | # An absolute path to your application root.
23 | :app_path => "#{Pod::Config.instance.installation_root}/.."
24 | )
25 |
26 | post_install do |installer|
27 | # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
28 | react_native_post_install(
29 | installer,
30 | config[:reactNativePath],
31 | :mac_catalyst_enabled => false,
32 | # :ccache_enabled => true
33 | )
34 | end
35 | end
36 |
--------------------------------------------------------------------------------
/src/utils/reducerInjectors.js:
--------------------------------------------------------------------------------
1 | import invariant from 'invariant';
2 | import {isEmpty, isFunction, isString} from 'lodash';
3 |
4 | import checkStore from './checkStore';
5 | import createReducer from '../reducers';
6 |
7 | export function injectReducerFactory(store, isValid) {
8 | return function injectReducer(key, reducer) {
9 | if (!isValid) {
10 | checkStore(store);
11 | }
12 |
13 | invariant(
14 | isString(key) && !isEmpty(key) && isFunction(reducer),
15 | '(src/utils...) injectReducer: Expected `reducer` to be a reducer function',
16 | );
17 |
18 | // Check `store.injectedReducers[key] === reducer` for hot reloading when a key is the same but a reducer is different
19 | if (
20 | Reflect.has(store.injectedReducers, key) &&
21 | store.injectedReducers[key] === reducer
22 | ) {
23 | return;
24 | }
25 |
26 | store.injectedReducers[key] = reducer;
27 | store.replaceReducer(createReducer(store.injectedReducers));
28 | };
29 | }
30 |
31 | export default function getInjectors(store) {
32 | checkStore(store);
33 |
34 | return {
35 | injectReducer: injectReducerFactory(store, true),
36 | };
37 | }
38 |
--------------------------------------------------------------------------------
/src/common/colors/index.js:
--------------------------------------------------------------------------------
1 | export default {
2 | primary: '#34495E',
3 | secondary: '#8B9800',
4 | primaryVariant: '#91A8AE',
5 | secondaryVariant: '',
6 | background: '#FCFCFC',
7 | surface: 'white',
8 | splashBackground: '',
9 | error: '#FF525E',
10 | onPrimary: 'white',
11 | onSecondary: 'white',
12 | onError: 'white',
13 | onSplash: '',
14 | onBackground: '',
15 | inputBorder: '#91A8AE', // or primaryVariant
16 | surfaceBorder: '#EBEBEB',
17 | orange_one: '#F77419',
18 | white: '#fff',
19 | purple_one: '#353755',
20 | black_one: '#373737',
21 | black_two: '#444B54',
22 | black_three: '#373838',
23 | black_four: '#2c2c2c',
24 | black_five: '#414B54',
25 | black_six: '#4a4a4a',
26 | blue_one: '#006DA4',
27 | blue_two: '#1A95E1',
28 | blue_three: '#0481C5',
29 | blue_four: '#0074AF',
30 | grey_one: '#EFF3FA',
31 | grey_two: '#F6F7F9',
32 | grey_three: '#C9C9C9',
33 | grey_four: '#F3F7FA',
34 | grey_five: '#747171',
35 | grey_six: '#F0EFF1',
36 | grey_Seven: '#F8F8F8',
37 | grey_eight: '#8B8B8B',
38 | grey_nine: '#EAEAEA',
39 | yellow_one: '#CFB000',
40 | yellow_two: '#EDD41C',
41 | yellow_three: '#F6D100',
42 | red_one: '#E2574C',
43 | green_one: '#01B779',
44 | };
45 |
--------------------------------------------------------------------------------
/src/lib/interactions.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Flexi Apps.
3 | *
4 | * Functions to display interactions toast
5 | */
6 |
7 | //TODO : use Toast from native base
8 |
9 | import { ToastAndroid, Alert, Platform } from 'react-native';
10 |
11 | import strings from 'config/strings';
12 | import storage from 'lib/storage';
13 | import { navigate } from 'router/navigator';
14 | export const displayToast = (msg) => {
15 | if (Platform.OS === 'android') {
16 | ToastAndroid.showWithGravity(msg, ToastAndroid.LONG, ToastAndroid.CENTER);
17 | } else {
18 | Alert.alert('', msg, [{ text: 'OK', onPress: () => { } }]);
19 | }
20 | };
21 |
22 | export const displaySessionToast = () => {
23 | Alert.alert(
24 | '',
25 | strings.sessionExpired,
26 | [
27 | {
28 | text: 'OK',
29 | onPress: () => {
30 | storage
31 | .clearSession('null')
32 | .then(() => {
33 | // ...
34 | // Actions.Login()
35 | navigate('Login');
36 | })
37 | .catch(() => {
38 | // ...
39 | // Actions.Login()
40 | navigate('Login');
41 | });
42 | },
43 | },
44 | ],
45 | {
46 | cancelable: false,
47 | },
48 | );
49 | };
50 |
--------------------------------------------------------------------------------
/src/modules/Auth/reducers/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // import front-end config
4 | import {
5 | LOGIN_REQUEST,
6 | LOGIN_SUCCESS,
7 | LOGIN_FAILURE,
8 | PASSWORD_REQUEST,
9 | PASSWORD_SUCCESS,
10 | PASSWORD_FAILURE,
11 | } from '../actionsTypes';
12 |
13 | // declare actions types
14 |
15 | /**
16 | * ## InitialState
17 | *
18 | * The fields we're concerned with
19 | */
20 | const initialState = {
21 | fetching: false,
22 | error: '',
23 | };
24 |
25 | /**
26 | * ## Reducer function
27 | * @param {Object} state - initialState
28 | * @param {Object} action - type and payload
29 | */
30 | export default function authReducer(state = initialState, action) {
31 | switch (action.type) {
32 | case LOGIN_REQUEST:
33 | return {
34 | ...state,
35 | fetching: true,
36 | };
37 |
38 | case LOGIN_SUCCESS:
39 | return initialState;
40 |
41 | case LOGIN_FAILURE:
42 | return {
43 | ...state,
44 | fetching: false,
45 | };
46 | case PASSWORD_REQUEST:
47 | return {...state, fetching: true};
48 | case PASSWORD_SUCCESS:
49 | return {...state, fetching: false};
50 | case PASSWORD_FAILURE:
51 | return {...state, fetching: false};
52 |
53 | default:
54 | return state;
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/src/lib/inputsValidations.js:
--------------------------------------------------------------------------------
1 | import {isUndefined} from 'lodash';
2 | import validate from 'validate.js';
3 |
4 | const emailConstraints = {
5 | from: {
6 | email: true,
7 | },
8 | };
9 |
10 | // const phonePattern = /^\d{9}$/;
11 | const phonePattern = /[0-9]{8,11}$/;
12 | const phoneConstraints = {
13 | phone: {
14 | format: {
15 | pattern: phonePattern,
16 | flags: 'i',
17 | message: 'must have 8 or 9 numbers, letters or special characters',
18 | },
19 | },
20 | };
21 |
22 | const namePattern = /^[A-Za-z]+$/;
23 | const usernameConstraints = {
24 | phone: {
25 | format: {
26 | pattern: namePattern,
27 | flags: 'i',
28 | message: 'must not includes numbers',
29 | },
30 | },
31 | };
32 |
33 | const inputValidation = (type, value) => {
34 | switch (type) {
35 | case 'email':
36 | return isUndefined(validate({from: value}, emailConstraints));
37 |
38 | case 'password':
39 | return value.length >= 6;
40 |
41 | case 'username':
42 | return isUndefined(validate({username: value}, usernameConstraints));
43 |
44 | case 'phone':
45 | return isUndefined(validate({phone: value}, phoneConstraints));
46 |
47 | default:
48 | return true;
49 | }
50 | };
51 |
52 | export default inputValidation;
53 |
--------------------------------------------------------------------------------
/src/modules/Profile/reducers/index.js:
--------------------------------------------------------------------------------
1 | // import front-end config
2 | import { unionBy } from "lodash";
3 | import actions from "../actionsTypes";
4 |
5 | const initialState = {
6 | fetching: false,
7 | response: {},
8 | news: {},
9 | };
10 |
11 | export default function authReducer(state = initialState, action) {
12 | switch (action.type) {
13 | /** notif */
14 | case actions.NOTIFICATION_REQUEST:
15 | return {
16 | ...state,
17 | fetching: true,
18 | };
19 |
20 | case actions.NOTIFICATION_SUCCESS:
21 | return {
22 | ...state,
23 | fetching: false,
24 | response: action.payload,
25 | };
26 |
27 | case actions.NOTIFICATION_FAILED:
28 | return {
29 | ...state,
30 | fetching: false,
31 | };
32 |
33 | /** follower */
34 | case actions.FOLLOWERS_REQUEST:
35 | return {
36 | ...state,
37 | fetching: true,
38 | };
39 |
40 | case actions.FOLLOWERS_SUCCESS:
41 | return {
42 | ...state,
43 | fetching: false,
44 | news: action.payload,
45 | };
46 |
47 | case actions.FOLLOWERS_FAILED:
48 | return {
49 | ...state,
50 | fetching: false,
51 | };
52 | default:
53 | return state;
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/src/reducers/globalReducer.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | import { getDefaultLang } from "../config/languages";
4 |
5 | // declare actions types
6 | import {
7 | SET_CURRENT_USER,
8 | SET_ONE_SIGNAL_ID,
9 | SET_SELECTED_LANGUAGE,
10 | SET_IS_GUEST,
11 | SET_USER_CONVER,
12 | } from "../actionsTypes";
13 |
14 | /**
15 | * ## InitialState
16 | *
17 | * The fields we're concerned with
18 | */
19 | const initialState = {
20 | currentUser: {},
21 | // oneSignalPlayerId: null,
22 | language: getDefaultLang(),
23 | isGuest: false,
24 | };
25 |
26 | /**
27 | * ## Reducer function
28 | * @param {Object} state - initialState
29 | * @param {Object} action - type and payload
30 | */
31 | export default function globalReducer(state = initialState, action) {
32 | switch (action.type) {
33 | case SET_CURRENT_USER:
34 | return {
35 | ...state,
36 | currentUser: action.payload,
37 | isGuest: false,
38 | };
39 |
40 | // case SET_ONE_SIGNAL_ID:
41 | // return { ...state, PoneSignallayerId: action.payload };
42 |
43 | case SET_SELECTED_LANGUAGE:
44 | return { ...state, language: action.payload };
45 |
46 | case SET_IS_GUEST:
47 | return { ...state, isGuest: action.payload };
48 |
49 | default:
50 | return state;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/src/common/components/Button/styles.js:
--------------------------------------------------------------------------------
1 | import styles from "styles";
2 | import colors from "colors";
3 |
4 | const { FontFamily, FontSize } = styles;
5 |
6 | import { ScaledSheet } from "react-native-size-matters/extend";
7 |
8 | export default ScaledSheet.create({
9 | bigContainer: {
10 | height: "60@vs",
11 | justifyContent: "center",
12 | alignItems: "center",
13 | width: "350@s",
14 | backgroundColor: colors.orange_one,
15 | borderRadius: 10,
16 | shadowColor: "#000",
17 | shadowOffset: {
18 | width: 0,
19 | height: 2,
20 | },
21 | shadowOpacity: 0.25,
22 | shadowRadius: 3.84,
23 | elevation: 1,
24 | alignSelf: "center",
25 | },
26 | disabled: {
27 | opacity: 0.5,
28 | backgroundColor: "#a0a1a2",
29 | },
30 | smallContainer: {
31 | height: "60@s",
32 | justifyContent: "center",
33 | alignItems: "center",
34 | width: "146@s",
35 | backgroundColor: colors.orange_one,
36 | borderRadius: "24.5@ms0.5",
37 | shadowColor: "#000",
38 | shadowOffset: {
39 | width: 0,
40 | height: 2,
41 | },
42 | shadowOpacity: 0.25,
43 | shadowRadius: 3.84,
44 | elevation: 5,
45 | },
46 | text: {
47 | fontFamily: "PTSans-Bold",
48 | color: colors.white,
49 | fontSize: FontSize.f18,
50 | },
51 | });
52 |
--------------------------------------------------------------------------------
/src/common/components/Button/index.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { TouchableOpacity, Text, ActivityIndicator } from "react-native";
3 | import LinearGradient from "react-native-linear-gradient";
4 |
5 | //styles
6 | import styles from "./styles";
7 |
8 | const Button = (props) => {
9 | return (
10 |
11 |
22 | {props.loading ? (
23 |
24 | ) : typeof props.content === "string" ? (
25 |
31 | {props.content}
32 |
33 | ) : (
34 | props.content
35 | )}
36 |
37 |
38 | );
39 | };
40 |
41 | export default Button;
42 |
--------------------------------------------------------------------------------
/src/common/components/Input/styles.js:
--------------------------------------------------------------------------------
1 | import styles from "styles";
2 | import colors from "colors";
3 |
4 | const { FontFamily, FontSize } = styles;
5 |
6 | import { ScaledSheet } from "react-native-size-matters/extend";
7 |
8 | export default ScaledSheet.create({
9 | container: {
10 | alignSelf: "center",
11 | width: "356@s",
12 | marginBottom: "15@vs",
13 | // marginLeft: "30@vs",
14 | },
15 | label: {
16 | color: "#042B72",
17 | fontSize: FontSize.f14,
18 | fontFamily: "PTSans-Bold",
19 | // marginLeft: "@s",
20 | marginBottom: "9@vs",
21 | textAlign: "left",
22 | },
23 | inputContainer: {
24 | height: "50@vs",
25 | backgroundColor: "#f2f5f8",
26 | flexDirection: "row",
27 | alignItems: "center",
28 | borderRadius: 5,
29 | paddingLeft: "15@s",
30 | // width: "350@s",
31 | // alignSelf: "center",
32 | },
33 | textInput: {
34 | flex: 1,
35 | margin: 0,
36 | padding: 0,
37 | fontSize: FontSize.f16,
38 | fontFamily: "PTSans-Regular",
39 | color: "#7E7E7E",
40 | textAlign: "left",
41 | },
42 | side: {
43 | width: "45@s",
44 | justifyContent: "center",
45 | alignItems: "center",
46 | height: "49@vs",
47 | },
48 | error: {
49 | alignSelf: "center",
50 | color: "red",
51 | fontFamily: FontFamily.nextMedium,
52 | fontSize: FontSize.small,
53 | },
54 | });
55 |
--------------------------------------------------------------------------------
/src/reducers/adherentCardReducer.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | import {SET_CURRENT_USER_ADHERENT_CARD, SET_CURRENT_USER_NOTIFICATION_PERMISSION} from "../actionsTypes";
4 |
5 | /**
6 | * ## InitialState
7 | *
8 | * The fields we're concerned with
9 | */
10 | const initialState = {
11 | card_type: "",
12 | company_name: "",
13 | current_year_membership: "",
14 | firstname: "",
15 | lastname: "",
16 | member_id: "",
17 | member_since: "",
18 | membership_status: false,
19 | };
20 |
21 | /**
22 | * ## Reducer function
23 | * @param {Object} state - initialState
24 | * @param {Object} action - type and payload
25 | */
26 | export default function adherentCardReducer(state = initialState, action) {
27 | switch (action.type) {
28 | case SET_CURRENT_USER_ADHERENT_CARD:
29 | return {
30 | ...state,
31 | card_type: action?.payload?.card_type ?? "",
32 | company_name: action?.payload?.company_name ?? "",
33 | current_year_membership: action?.payload?.current_year_membership ?? "",
34 | firstname: action?.payload?.firstname ?? "",
35 | lastname: action?.payload?.lastname ?? "",
36 | member_id: action?.payload?.member_id ?? "",
37 | member_since: action?.payload?.member_since ?? "",
38 | membership_status: action?.payload?.membership_status ?? false,
39 | };
40 | default:
41 | return state;
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/src/lib/notificationHandler.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Flexi Apps.
3 | *
4 | * Notifications handler
5 | *
6 | */
7 |
8 | import { navigate } from "router/navigator";
9 |
10 |
11 | // Interactions toast
12 | // import {displayToast} from 'lib/interactions';
13 |
14 | // strings config
15 | // import strings from 'config/strings';
16 |
17 | // some actions to dispatch
18 |
19 | export default ({ additionalData, isAppInFocus }, dispatch, getState) => {
20 | try {
21 | switch (additionalData.notif_type) {
22 | case 'new_pain':
23 | // ...
24 | // Actions._History();
25 | break;
26 | case 'new_message':
27 | // ...
28 | // getState().global.currentUser
29 | // ? getState().global.currentUser.roles[0] === 'doctor'
30 | // ? Actions.reset('drawer')
31 | // : getState().global.conversationUser
32 | // ? Actions.Chat({
33 | // canal: getState().global.conversationUser._id,
34 | // headerName:
35 | // getState().global.conversationUser.users !== null
36 | // ? getState().global.conversationUser.users[0].user.name
37 | // : '',
38 | // })
39 | // : Actions.reset('Login')
40 | // : Actions.reset('Login');
41 | break;
42 | default:
43 | break;
44 | }
45 | } catch { }
46 | };
47 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
4 |
5 | # Xcode
6 | #
7 | build/
8 | *.pbxuser
9 | !default.pbxuser
10 | *.mode1v3
11 | !default.mode1v3
12 | *.mode2v3
13 | !default.mode2v3
14 | *.perspectivev3
15 | !default.perspectivev3
16 | xcuserdata
17 | *.xccheckout
18 | *.moved-aside
19 | DerivedData
20 | *.hmap
21 | *.ipa
22 | *.xcuserstate
23 | **/.xcode.env.local
24 |
25 | # Android/IntelliJ
26 | #
27 | build/
28 | .idea
29 | .gradle
30 | local.properties
31 | *.iml
32 | *.hprof
33 | .cxx/
34 | *.keystore
35 | !debug.keystore
36 | .kotlin/
37 |
38 | # node.js
39 | #
40 | node_modules/
41 | npm-debug.log
42 | yarn-error.log
43 |
44 | # fastlane
45 | #
46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47 | # screenshots whenever they are needed.
48 | # For more information about the recommended setup visit:
49 | # https://docs.fastlane.tools/best-practices/source-control/
50 |
51 | **/fastlane/report.xml
52 | **/fastlane/Preview.html
53 | **/fastlane/screenshots
54 | **/fastlane/test_output
55 |
56 | # Bundle artifact
57 | *.jsbundle
58 |
59 | # Ruby / CocoaPods
60 | **/Pods/
61 | /vendor/bundle/
62 |
63 | # Temporary files created by Metro to check the health of the file watcher
64 | .metro-health-check*
65 |
66 | # testing
67 | /coverage
68 |
69 | # Yarn
70 | .yarn/*
71 | !.yarn/patches
72 | !.yarn/plugins
73 | !.yarn/releases
74 | !.yarn/sdks
75 | !.yarn/versions
76 |
--------------------------------------------------------------------------------
/ios/SNPINews/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "40.png",
5 | "idiom" : "iphone",
6 | "scale" : "2x",
7 | "size" : "20x20"
8 | },
9 | {
10 | "filename" : "60.png",
11 | "idiom" : "iphone",
12 | "scale" : "3x",
13 | "size" : "20x20"
14 | },
15 | {
16 | "filename" : "58.png",
17 | "idiom" : "iphone",
18 | "scale" : "2x",
19 | "size" : "29x29"
20 | },
21 | {
22 | "filename" : "87.png",
23 | "idiom" : "iphone",
24 | "scale" : "3x",
25 | "size" : "29x29"
26 | },
27 | {
28 | "filename" : "80.png",
29 | "idiom" : "iphone",
30 | "scale" : "2x",
31 | "size" : "40x40"
32 | },
33 | {
34 | "filename" : "120.png",
35 | "idiom" : "iphone",
36 | "scale" : "3x",
37 | "size" : "40x40"
38 | },
39 | {
40 | "filename" : "120 1.png",
41 | "idiom" : "iphone",
42 | "scale" : "2x",
43 | "size" : "60x60"
44 | },
45 | {
46 | "filename" : "180.png",
47 | "idiom" : "iphone",
48 | "scale" : "3x",
49 | "size" : "60x60"
50 | },
51 | {
52 | "filename" : "1024.png",
53 | "idiom" : "ios-marketing",
54 | "scale" : "1x",
55 | "size" : "1024x1024"
56 | }
57 | ],
58 | "info" : {
59 | "author" : "xcode",
60 | "version" : 1
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/ios/SNPINews/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import React
3 | import React_RCTAppDelegate
4 | import ReactAppDependencyProvider
5 |
6 | @main
7 | class AppDelegate: UIResponder, UIApplicationDelegate {
8 | var window: UIWindow?
9 |
10 | var reactNativeDelegate: ReactNativeDelegate?
11 | var reactNativeFactory: RCTReactNativeFactory?
12 |
13 | func application(
14 | _ application: UIApplication,
15 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
16 | ) -> Bool {
17 | let delegate = ReactNativeDelegate()
18 | let factory = RCTReactNativeFactory(delegate: delegate)
19 | delegate.dependencyProvider = RCTAppDependencyProvider()
20 |
21 | reactNativeDelegate = delegate
22 | reactNativeFactory = factory
23 |
24 | window = UIWindow(frame: UIScreen.main.bounds)
25 |
26 | factory.startReactNative(
27 | withModuleName: "snpiNews",
28 | in: window,
29 | launchOptions: launchOptions
30 | )
31 |
32 | return true
33 | }
34 | }
35 |
36 | class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate {
37 | override func sourceURL(for bridge: RCTBridge) -> URL? {
38 | self.bundleURL()
39 | }
40 |
41 | override func bundleURL() -> URL? {
42 | #if DEBUG
43 | RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")
44 | #else
45 | Bundle.main.url(forResource: "main", withExtension: "jsbundle")
46 | #endif
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/modules/Auth/containers/resetPassword/components/styles.js:
--------------------------------------------------------------------------------
1 | import styles from "styles";
2 | import colors from "colors";
3 |
4 | const { FontFamily, FontSize } = styles;
5 |
6 | import { ScaledSheet } from "react-native-size-matters/extend";
7 |
8 | export default ScaledSheet.create({
9 | container: {
10 | flex: 1,
11 | backgroundColor:'#fff'
12 | },
13 | back: {
14 | // height: "6@vs",
15 | // width: "12@vs",
16 | height: "25@vs",
17 | width: "25@vs",
18 | left: "10@vs",
19 | top: "20@vs",
20 | },
21 | backContent: {
22 | left: "10@vs",
23 | top: "20@vs",
24 | width: "80@vs",
25 | height: "80@vs",
26 | // borderWidth: 2,
27 | },
28 | contentContainerner: {
29 | flex: 1,
30 | marginTop: "20@vs",
31 | },
32 | recoverText: {
33 | fontFamily: FontFamily.nextBold,
34 | fontSize: FontSize.f25,
35 | color: colors.purple_one,
36 | alignSelf: "center",
37 | // marginLeft: "28@s",
38 | // textAlign: "left",
39 | marginBottom: "30@vs",
40 | // marginBottom: '33@vs',
41 | },
42 |
43 | ButtonContainer: {
44 | flex: 1,
45 | justifyContent: "flex-end",
46 | paddingBottom: "20@vs",
47 | alignSelf: "center",
48 | },
49 | roleTypeQuestion: {
50 | marginTop: "24@vs",
51 | marginLeft: "28@s",
52 | marginBottom: "11@vs",
53 | color: colors.purple_one,
54 | fontSize: "16@ms0.3",
55 | fontFamily: FontFamily.nextSemiBold,
56 | textAlign: "left",
57 | },
58 | });
59 |
--------------------------------------------------------------------------------
/src/modules/Home/reducers/index.js:
--------------------------------------------------------------------------------
1 | // import front-end config
2 | import { unionBy } from "lodash";
3 | import actions from "../actionsTypes";
4 |
5 | const initialState = {
6 | fetching: false,
7 | error: "",
8 | list: [],
9 | news: {},
10 | count: 0,
11 | };
12 |
13 | export default function authReducer(state = initialState, action) {
14 | switch (action.type) {
15 | /** List */
16 | case actions.LIST_REQUEST:
17 | return {
18 | ...state,
19 | fetching: true,
20 | };
21 |
22 | case actions.LIST_SUCCESS:
23 | const { items, count, offset } = action.payload.response;
24 | // console.log("comming data", items);
25 | const list = offset === 0 ? items : unionBy(state.list, items, "id");
26 | return {
27 | ...state,
28 | fetching: false,
29 | list,
30 | count,
31 | };
32 |
33 | case actions.LIST_FAILED:
34 | return {
35 | ...state,
36 | fetching: false,
37 | };
38 |
39 | /** One */
40 | case actions.GET_ONE_REQUEST:
41 | return {
42 | ...state,
43 | fetching: true,
44 | };
45 |
46 | case actions.GET_ONE_SUCCESS:
47 | return {
48 | ...state,
49 | fetching: false,
50 | news: action.payload.response,
51 | };
52 |
53 | case actions.LIST_FAILED:
54 | return {
55 | ...state,
56 | fetching: false,
57 | };
58 |
59 | default:
60 | return state;
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/src/scripts/generate.routes.js:
--------------------------------------------------------------------------------
1 | var path = require('path');
2 | var writeFileSync = require('fs').writeFileSync;
3 |
4 | // GET ROUTING CONFIG FILE PATH
5 | const routerPath = path.join(process.cwd(), 'src', 'router');
6 | const routingConfigPath = `${routerPath}/routingConfig.js`;
7 |
8 | // GLOB LIB
9 | var glob = require('glob');
10 |
11 | // RETRIEVE ALL MODULES ROUTES FILES
12 | const routesFiles = glob.sync('routes.js', {
13 | cwd: process.cwd() + '/src',
14 | root: '/',
15 | matchBase: true,
16 | });
17 |
18 | // WRITE THE ROUTING CONFIG FILE CONTENT
19 | try {
20 | const routesNames = routesFiles.map(file => {
21 | return file.split('/')[1].toLowerCase() + 'Routes';
22 | });
23 | const routesImports = routesFiles.map(file => {
24 | const name = file.split('/')[1].toLowerCase() + 'Routes';
25 | return 'import ' + name + ' from ' + '"' + file + '"';
26 | });
27 |
28 | // content to write in the file
29 | const content = `
30 | /*
31 | * Routing component (from modules folder)
32 | */
33 | ${routesImports.toString().replace(/[,]/gi, '\n')}
34 |
35 | export default function configureRoutes() {
36 | const routes = [
37 | ${routesNames
38 | .map(name => '...' + name)
39 | .toString()
40 | .replace(',', ',\n')}
41 | ];
42 |
43 | return routes;
44 | }
45 | `;
46 |
47 | //TODO : check 'routingConfigPath' file exist
48 | writeFileSync(routingConfigPath, content);
49 | } catch (error) {
50 | console.log('routing configuration error', error);
51 | }
52 |
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | import React from "react";
4 |
5 | import { Provider } from "react-redux";
6 | import { NetworkProvider } from "./contextProviders/NetworkProvider";
7 | import { AppStateProvider } from "./contextProviders/AppStateProvider";
8 | import { MenuProvider } from "react-native-popup-menu";
9 | import store from "./store";
10 |
11 | import notificationHandler from "./lib/notificationHandler";
12 |
13 | import Router from "./router";
14 | import { navigate, navigationRef } from "router/navigator";
15 | import { NavigationContainer } from '@react-navigation/native';
16 |
17 | export default class Main extends React.Component {
18 | constructor(props) {
19 | super(props);
20 | }
21 |
22 | componentDidMount() {
23 | }
24 |
25 | async componentWillUnmount() {
26 | }
27 |
28 | onOpened = (openResult) => {
29 | const { additionalData, isAppInFocus } = openResult.notification.payload;
30 | const { dispatch, getState } = store;
31 | notificationHandler({ additionalData, isAppInFocus }, dispatch, getState);
32 | };
33 |
34 | render() {
35 | return (
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | );
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/android/app/BUCK:
--------------------------------------------------------------------------------
1 | # To learn about Buck see [Docs](https://buckbuild.com/).
2 | # To run your application with Buck:
3 | # - install Buck
4 | # - `npm start` - to start the packager
5 | # - `cd android`
6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
8 | # - `buck install -r android/app` - compile, install and run application
9 | #
10 |
11 | load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
12 |
13 | lib_deps = []
14 |
15 | create_aar_targets(glob(["libs/*.aar"]))
16 |
17 | create_jar_targets(glob(["libs/*.jar"]))
18 |
19 | android_library(
20 | name = "all-libs",
21 | exported_deps = lib_deps,
22 | )
23 |
24 | android_library(
25 | name = "app-code",
26 | srcs = glob([
27 | "src/main/java/**/*.java",
28 | ]),
29 | deps = [
30 | ":all-libs",
31 | ":build_config",
32 | ":res",
33 | ],
34 | )
35 |
36 | android_build_config(
37 | name = "build_config",
38 | package = "com.snpi.news",
39 | )
40 |
41 | android_resource(
42 | name = "res",
43 | package = "com.snpi.news",
44 | res = "src/main/res",
45 | )
46 |
47 | android_binary(
48 | name = "app",
49 | keystore = "//android/keystores:debug",
50 | manifest = "src/main/AndroidManifest.xml",
51 | package_type = "debug",
52 | deps = [
53 | ":app-code",
54 | ],
55 | )
56 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/snpinews/MainApplication.kt:
--------------------------------------------------------------------------------
1 | package com.snpinews
2 |
3 | import android.app.Application
4 | import com.facebook.react.PackageList
5 | import com.facebook.react.ReactApplication
6 | import com.facebook.react.ReactHost
7 | import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative
8 | import com.facebook.react.ReactNativeHost
9 | import com.facebook.react.ReactPackage
10 | import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
11 | import com.facebook.react.defaults.DefaultReactNativeHost
12 |
13 | class MainApplication : Application(), ReactApplication {
14 |
15 | override val reactNativeHost: ReactNativeHost =
16 | object : DefaultReactNativeHost(this) {
17 | override fun getPackages(): List =
18 | PackageList(this).packages.apply {
19 | // Packages that cannot be autolinked yet can be added manually here, for example:
20 | // add(MyReactNativePackage())
21 | }
22 |
23 | override fun getJSMainModuleName(): String = "index"
24 |
25 | override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
26 |
27 | override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
28 | override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
29 | }
30 |
31 | override val reactHost: ReactHost
32 | get() = getDefaultReactHost(applicationContext, reactNativeHost)
33 |
34 | override fun onCreate() {
35 | super.onCreate()
36 | loadReactNative(this)
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/modules/Profile/containers/notifications/components/styles.js:
--------------------------------------------------------------------------------
1 | import styles from "styles";
2 | import colors from "colors";
3 | const { FontFamily, FontSize } = styles;
4 |
5 | import { ScaledSheet } from "react-native-size-matters/extend";
6 |
7 | export default ScaledSheet.create({
8 | container: {
9 | paddingVertical: 15,
10 | backgroundColor:'#fff'
11 | },
12 | hedaerContent: {
13 | flexDirection: "row",
14 | top: "10@vs",
15 | justifyContent: "space-between",
16 | },
17 | back: {
18 | // height: "6@vs",
19 | // width: "12@vs",
20 | height: "25@vs",
21 | width: "25@vs",
22 | // left: "10@vs",
23 | top: "-5@vs",
24 | },
25 | backContent: {
26 | left: "10@vs",
27 | // top: "20@vs",
28 | width: "80@vs",
29 | height: "80@vs",
30 | justifyContent: "center",
31 | // borderWidth: 2,
32 | },
33 | title: {
34 | color: "#000000",
35 | fontSize: 16,
36 | fontFamily: "PTSans-Bold",
37 | textAlign: "center",
38 | top: 20,
39 | position: 'absolute',
40 | left: 50,
41 | right: 50
42 | },
43 | choices: {
44 | top: 25,
45 | },
46 | choiceContent: {
47 | backgroundColor: "#fff",
48 | // padding: 25,
49 | height: "50@vs",
50 | borderRadius: 10,
51 | marginHorizontal: 15,
52 | marginVertical: 10,
53 | flexDirection: "row",
54 | justifyContent: "space-between",
55 | alignItems: "center",
56 | paddingHorizontal: 25,
57 | },
58 | choice: {
59 | color: "#042B72",
60 | fontSize: 16,
61 | fontFamily: "PTSans-Bold",
62 | },
63 | });
64 |
--------------------------------------------------------------------------------
/src/modules/ForceUpdate/containers/components/index.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | // rn-comp
4 | import { View, Image, Text, TouchableOpacity } from "react-native";
5 |
6 | // styles
7 | import styles from "./styles";
8 |
9 | // strings
10 | // ...
11 | // import strings from "config/strings";
12 | import strings from "modules/Auth/locales/fr";
13 | import LinearGradient from "react-native-linear-gradient";
14 |
15 | const ForceUpdate = () => {
16 | return (
17 |
18 |
19 |
24 |
25 | {/* */}
31 |
32 |
37 |
38 | {strings.update}
39 |
40 |
41 | {strings.visit_store}
42 |
43 |
44 | {/* */}
45 |
46 | );
47 | };
48 |
49 | export default ForceUpdate;
50 |
--------------------------------------------------------------------------------
/src/modules/Home/scripts/time.js:
--------------------------------------------------------------------------------
1 | import moment from "moment";
2 |
3 | export const date = (createdAt) => {
4 | /** generate time */
5 | const today = new Date();
6 | const old = new Date(createdAt);
7 | // console.log(today, old);
8 | /** Extract infos */
9 | const today_day = today.getUTCDate();
10 | const today_month = today.getUTCMonth() + 1;
11 | const today_year = today.getUTCFullYear();
12 | const today_hours = today.getUTCHours() + 1;
13 | const today_minutes = today.getUTCMinutes() + 1;
14 |
15 | const old_day = old.getUTCDate();
16 | const old_month = old.getUTCMonth() + 1;
17 | const old_year = old.getUTCFullYear();
18 | const old_hours = old.getUTCHours() + 1;
19 | const old_minutes = old.getUTCMinutes() + 1;
20 |
21 | /** Calculs diff */
22 | const day = today_day - old_day;
23 | const month = today_month - old_month;
24 | const year = today_year - old_year;
25 | const hours = today_hours - old_hours;
26 | const minutes = today_minutes - old_minutes;
27 | // console.log(year, month, day, hours, minutes);
28 | // Same year
29 | if (year === 0) {
30 | // Same months
31 | if (month === 0) {
32 | // Same day
33 | if (day === 0) {
34 | // Same houre
35 | if (hours === 0) {
36 | return `Il y a ${minutes} minutes`;
37 | } else {
38 | return `Il y a ${hours} heures`;
39 | }
40 | } else {
41 | return `Il y a ${day} jours`;
42 | }
43 | } else {
44 | return `Il y a ${month} mois`;
45 | }
46 | } else {
47 | return `Il y a ${year} années`;
48 | }
49 | };
50 |
--------------------------------------------------------------------------------
/src/modules/Auth/containers/passwordMessage/components/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { View, Text, Image, TouchableOpacity } from 'react-native';
3 |
4 | //styles
5 | import styles from './styles';
6 |
7 | //lib
8 | // ...
9 | // import {Actions} from 'react-native-router-flux';
10 |
11 | //components
12 | import Button from 'common/components/Button';
13 | // ...
14 | // import strings from 'config/strings';
15 | import strings from 'modules/Auth/locales/fr';
16 | import { navigate } from 'router/navigator';
17 |
18 | const PasswordMessage = (props) => {
19 | return (
20 |
21 | {
24 | // ...
25 | // Actions.reset('FirstView')
26 | navigate('FirstView');
27 | }}>
28 |
32 |
33 | {strings.receivePassword}
34 |
40 |
41 |
51 |
52 | );
53 | };
54 |
55 | export default PasswordMessage;
56 |
--------------------------------------------------------------------------------
/src/common/components/Input/index.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import {
3 | TouchableOpacity,
4 | View,
5 | Text,
6 | TextInput,
7 | I18nManager,
8 | } from "react-native";
9 |
10 | //styles
11 | import styles from "./styles";
12 |
13 | const Input = (props) => {
14 | return (
15 |
16 | {props.label}
17 |
22 | {props.onTouch ? (
23 | {props.value}
24 | ) : (
25 | props.onChangeText(text)}
32 | secureTextEntry={props.secureTextEntry}
33 | keyboardType={props.keyboardType}
34 | onEndEditing={props.onEndEditing}
35 | />
36 | )}
37 | {I18nManager.isRTL && !props.rightIcon && }
38 | {props.rightIcon && (
39 |
44 | {typeof props.rightIcon === "string" ? : props.rightIcon}
45 |
46 | )}
47 |
48 | {props.error && {props.errorMessage}}
49 |
50 | );
51 | };
52 |
53 | export default Input;
54 |
--------------------------------------------------------------------------------
/src/modules/ForceUpdate/containers/components/styles.js:
--------------------------------------------------------------------------------
1 | import styles from "styles";
2 |
3 | const { FontFamily, FontSize, DeviceHeight, DeviceWidth } = styles;
4 |
5 | import { ScaledSheet } from "react-native-size-matters/extend";
6 |
7 | export default ScaledSheet.create({
8 | container: {
9 | flex: 1,
10 | },
11 | headerContainer: {
12 | marginTop: "25@vs",
13 | backgroundColor: "#FFF",
14 | paddingVertical: "15@vs",
15 | marginHorizontal: "32@s",
16 | borderRadius: "20@ms",
17 | },
18 | moovanceHeader: {
19 | alignSelf: "center",
20 | // width: "20@vs",
21 | // height: "150@vs",
22 | },
23 | updateContainer: {
24 | position: "absolute",
25 | top: DeviceHeight * 0.23,
26 | alignSelf: "center",
27 | width: DeviceWidth * 0.95,
28 | paddingVertical: "20@vs",
29 | borderRadius: "25@ms",
30 | borderWidth: 1,
31 | borderColor: "#000",
32 | },
33 | moovanceLogo: {
34 | alignSelf: "center",
35 | width: "201@s",
36 | height: "201@vs",
37 | // borderRadius: "150@ms",
38 | },
39 | messageConatainer: {
40 | paddingVertical: "16@vs",
41 | paddingHorizontal: "17@s",
42 | },
43 | messageContent: {
44 | color: "#000",
45 | fontWeight: "normal",
46 | fontFamily: FontFamily.interRegular,
47 | textAlign: "center",
48 | fontSize: FontSize.f18,
49 | letterSpacing: -0.02,
50 | },
51 | btnToStore: {
52 | alignSelf: "center",
53 | padding: "16@vs",
54 | borderRadius: "20@ms",
55 | backgroundColor: "#5e6060",
56 | },
57 | visit_store: {
58 | color: "#FFF",
59 | fontWeight: "bold",
60 | fontFamily: FontFamily.interRegular,
61 | textAlign: "left",
62 | fontSize: FontSize.f16,
63 | letterSpacing: -0.02,
64 | },
65 | });
66 |
--------------------------------------------------------------------------------
/android/app/src/main/res/raw/node_modules_reactnativevectoricons_glyphmaps_evilicons.json:
--------------------------------------------------------------------------------
1 | {
2 | "archive": 61696,
3 | "arrow-down": 61697,
4 | "arrow-left": 61698,
5 | "arrow-right": 61699,
6 | "arrow-up": 61700,
7 | "bell": 61701,
8 | "calendar": 61702,
9 | "camera": 61703,
10 | "cart": 61704,
11 | "chart": 61705,
12 | "check": 61706,
13 | "chevron-down": 61707,
14 | "chevron-left": 61708,
15 | "chevron-right": 61709,
16 | "chevron-up": 61710,
17 | "clock": 61711,
18 | "close": 61712,
19 | "close-o": 61713,
20 | "comment": 61714,
21 | "credit-card": 61715,
22 | "envelope": 61716,
23 | "exclamation": 61717,
24 | "external-link": 61718,
25 | "eye": 61719,
26 | "gear": 61720,
27 | "heart": 61721,
28 | "image": 61722,
29 | "like": 61723,
30 | "link": 61724,
31 | "location": 61725,
32 | "lock": 61726,
33 | "minus": 61727,
34 | "navicon": 61728,
35 | "paperclip": 61729,
36 | "pencil": 61730,
37 | "play": 61731,
38 | "plus": 61732,
39 | "pointer": 61733,
40 | "question": 61734,
41 | "redo": 61735,
42 | "refresh": 61736,
43 | "retweet": 61737,
44 | "sc-facebook": 61738,
45 | "sc-github": 61739,
46 | "sc-google-plus": 61740,
47 | "sc-instagram": 61741,
48 | "sc-linkedin": 61742,
49 | "sc-odnoklassniki": 61743,
50 | "sc-pinterest": 61744,
51 | "sc-skype": 61745,
52 | "sc-soundcloud": 61746,
53 | "sc-telegram": 61747,
54 | "sc-tumblr": 61748,
55 | "sc-twitter": 61749,
56 | "sc-vimeo": 61750,
57 | "sc-vk": 61751,
58 | "sc-youtube": 61752,
59 | "search": 61753,
60 | "share-apple": 61754,
61 | "share-google": 61755,
62 | "spinner": 61756,
63 | "spinner-2": 61757,
64 | "spinner-3": 61758,
65 | "star": 61759,
66 | "tag": 61760,
67 | "trash": 61761,
68 | "trophy": 61762,
69 | "undo": 61763,
70 | "unlock": 61764,
71 | "user": 61765
72 | }
--------------------------------------------------------------------------------
/src/contextProviders/AppStateProvider/index.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { AppState, Linking } from "react-native";
3 | import { ReactReduxContext } from "react-redux";
4 | import WonderPush from "react-native-wonderpush";
5 | // import {loginHandler} from 'services/oAuth20'; <- uncommnent this line if social login activated
6 |
7 | export const AppStateContext = React.createContext({ appState: "" });
8 | export class AppStateProvider extends React.PureComponent {
9 | constructor(props) {
10 | super(props);
11 | this.state = {
12 | appState: AppState.currentState,
13 | };
14 |
15 | this.appStateSubscription = null;
16 | this.linkingSubscription = null;
17 | }
18 |
19 | static contextType = ReactReduxContext;
20 |
21 | componentDidMount() {
22 | this.appStateSubscription = AppState.addEventListener("change", this._handleAppStateChange);
23 | this.linkingSubscription = Linking.addEventListener("url", this.handleOpenURL);
24 |
25 | this.checkOpeningUrl();
26 | }
27 |
28 | componentWillUnmount() {
29 | if (this.appStateSubscription) {
30 | this.appStateSubscription.remove(); // ✅ Correct
31 | }
32 | if (this.linkingSubscription) {
33 | this.linkingSubscription.remove(); // ✅ Correct
34 | }
35 | }
36 |
37 | checkOpeningUrl = async () => {
38 | try {
39 | const url = await Linking.getInitialURL();
40 | if (url) {
41 | this.handleOpenURL({ url });
42 | }
43 | } catch { }
44 | };
45 |
46 | _handleAppStateChange = (nextAppState) => {
47 | this.setState({ appState: nextAppState });
48 | };
49 |
50 | handleOpenURL = ({ url }) => {
51 | // Handle the deep link here
52 | };
53 |
54 | render() {
55 | return (
56 |
57 | {this.props.children}
58 |
59 | );
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/ios/SNPINews/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | snpiNews
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIconName
12 | AppIcon
13 | CFBundleIdentifier
14 | $(PRODUCT_BUNDLE_IDENTIFIER)
15 | CFBundleInfoDictionaryVersion
16 | 6.0
17 | CFBundleName
18 | $(PRODUCT_NAME)
19 | CFBundlePackageType
20 | APPL
21 | CFBundleShortVersionString
22 | $(MARKETING_VERSION)
23 | CFBundleSignature
24 | ????
25 | CFBundleVersion
26 | $(CURRENT_PROJECT_VERSION)
27 | LSRequiresIPhoneOS
28 |
29 | NSAppTransportSecurity
30 |
31 | NSAllowsArbitraryLoads
32 |
33 | NSAllowsLocalNetworking
34 |
35 |
36 | RCTNewArchEnabled
37 |
38 | UILaunchStoryboardName
39 | LaunchScreen
40 | UIRequiredDeviceCapabilities
41 |
42 | arm64
43 |
44 | UISupportedInterfaceOrientations
45 |
46 | UIInterfaceOrientationPortrait
47 |
48 | UISupportedInterfaceOrientations~ipad
49 |
50 | UIInterfaceOrientationLandscapeLeft
51 | UIInterfaceOrientationLandscapeRight
52 | UIInterfaceOrientationPortrait
53 |
54 | UIViewControllerBasedStatusBarAppearance
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/src/reducers/index.js:
--------------------------------------------------------------------------------
1 | // import { combineReducers } from 'redux';
2 |
3 | // const reducerModule = {
4 | // global: require('./globalReducer'),
5 | // auth: require('../modules/Auth/reducers'),
6 | // list: require('../modules/Home/reducers'),
7 | // profile: require('../modules/Profile/reducers'),
8 | // notificationsPermissions: require('./notificationsPermissionsReducer'),
9 | // adherentCard: require('./adherentCardReducer'),
10 | // };
11 |
12 | // const Reducers = {};
13 |
14 | // Object.entries(reducerModule).forEach(([name, mod]) => {
15 | // // Check if it's a function (default export)
16 | // if (typeof mod === 'function' || typeof mod.default === 'function') {
17 | // Reducers[name] = mod.default || mod;
18 | // console.log(`✅ Loaded reducer: ${name}`);
19 | // } else {
20 | // console.warn(`⚠️ Missing or invalid reducer for module: ${name}`);
21 | // }
22 | // });
23 |
24 | // // ✅ This is now a function
25 | // export default function createReducer(injectedReducers = {}) {
26 | // return combineReducers({
27 | // ...Reducers,
28 | // ...injectedReducers,
29 | // });
30 | // }
31 |
32 | const reducerModule = {
33 | global: require('./globalReducer'),
34 | auth: require('../modules/Auth/reducers'),
35 | list: require('../modules/Home/reducers'),
36 | profile: require('../modules/Profile/reducers'),
37 | notificationsPermissions: require('./notificationsPermissionsReducer'),
38 | adherentCard: require('./adherentCardReducer'),
39 | };
40 |
41 | const Reducers = {};
42 |
43 | Object.entries(reducerModule).forEach(([name, mod]) => {
44 | // Check if it's a function (default export)
45 | if (typeof mod === 'function' || typeof mod.default === 'function') {
46 | Reducers[name] = mod.default || mod;
47 | console.log(`✅ Loaded reducer: ${name}`);
48 | } else {
49 | console.warn(`⚠️ Missing or invalid reducer for module: ${name}`);
50 | }
51 | });
52 |
53 | export default Reducers;
54 |
--------------------------------------------------------------------------------
/src/locales/fr.js:
--------------------------------------------------------------------------------
1 | // french translations goes here
2 |
3 | const fr = {
4 | syndicat: "PREMIER SYNDICAT FRANÇAIS DE L’IMMOBILIER DEPUIS 1963",
5 | /******************************* GENERAL **************************************** */
6 | sessionExpired: "Votre session a expiré",
7 |
8 | updating: "Chargement en cours...",
9 | featured: "A LA UNE",
10 |
11 | enableGpsforUX:
12 | "Veuillez activer votre service GPS pour une meilleure experience utilisateur",
13 |
14 | pleaseLogin: "Vous devez vous connecter pour effecter cette opération",
15 |
16 | /** ********************************* IMAGE PICKER LIB **************************************** */
17 | cancel: "Annuler",
18 | takePicture: "Prendre une photo",
19 | chooseFromLibrary: "Choisir à partir d'une librairie",
20 | selectPhoto: "Choisir",
21 |
22 | mySettings: "Paramètres",
23 | cgu: "Conditions Générales d’Utilisation",
24 | policies: "Politique de confidentialités",
25 |
26 | /** ********************************* DATE PICKER PICKER **************************************** */
27 | selectDate: "Choisir une date",
28 | date_cancel: "Annuler",
29 | date_confirm: "Confirmer",
30 |
31 | /************************************ affaire status ************************/
32 | annulee: "Annulée",
33 | valide: "Validé",
34 | finalisee: "Finalisée",
35 | en_attente: "En att vald",
36 | incomplete: "Incomplète",
37 | relancee: "Relancée",
38 | retractre: "Retractée",
39 |
40 | //long
41 | suspendu: "Suspendu",
42 | recycler: "Recycler",
43 | signe: "Signé",
44 | en_negociation: "En Négociation",
45 | proposition: "Proposition",
46 | signature_incomplete: "Signature Incomplete",
47 | en_attente_validation: "En Attente de Validation",
48 | finalise: "Finalisé",
49 | expire: "Expiré",
50 |
51 | /******************************** URGENCE ************************/
52 | bas: "Bas",
53 | moyen: "Moyen",
54 | haute: "Haute",
55 | };
56 |
57 | export default fr;
58 |
--------------------------------------------------------------------------------
/src/modules/Auth/locales/fr.js:
--------------------------------------------------------------------------------
1 | export default {
2 | //first View
3 | homePage_acceuil: "Bienvenue sur l’application SNPI.",
4 | homePage_paragraph:
5 | "Ce nouveau service vous informe en temps réel de toute l’actualité du Syndicat.",
6 | homePage_commencer: "Commencer",
7 |
8 | //Login View
9 | numero_adherent: "NUMÉRO D'ADHÉRENT",
10 | mail_address: "ADRESSE EMAIL",
11 | mot_de_passe: "MOT DE PASSE ",
12 | connexion: "Connexion",
13 |
14 | //cgus
15 | cguContinue: "En continuant, j’accepte les",
16 | cgu: "Conditions générales d’utilisation",
17 | politicsRead: "de Optivade et je reconnais avoir lu la",
18 | po: "Politique de confidentialité",
19 |
20 | // signuppage
21 | identifier: "S'identifier",
22 | signUpLike: "S’enregistrer en tant que",
23 | patient: "Patient",
24 | doctor: "Docteur",
25 | name: "Nom et Prenom *",
26 | email: "E-mail *",
27 | phone: "Numéro de téléphone *",
28 | password: "Mot de passe",
29 | homme: "Homme",
30 | femme: "Femme",
31 | sexe: "Genre",
32 | speciality: "Spécialité",
33 | city: "Ville",
34 | birthDate: "Date de naissance",
35 | continuer: "Continuer",
36 |
37 | //email validation
38 | emailValidation: "Validation par Email",
39 | openEmail: "Ouvrez votre boite",
40 | clickEmail: "et cliquez sur le lien de confirmation",
41 | emailSpam: "Pensez à vérifier votre courrier indésirable/vos spams",
42 | emailValid: "J’ai validé mon Email",
43 |
44 | // loginPage
45 | loginType: "Vous êtes Médecin ou Patient ?",
46 | loginPatient: "Patient",
47 | loginDoctor: "Médecin",
48 | loginEmail: "E-mail",
49 | forgetPassword: "Mot de passe oublié ?",
50 | noAccount: "Je n’ai pas de compte",
51 |
52 | //reset passwrd
53 | passwordReset: "Récuperer le mot de passe",
54 | resetPassword: "Renvoyer le mot de passe",
55 |
56 | //password message
57 | receivePassword: "Vous allez recevoir le nouveau mot de passe par Email",
58 | understand: "J’ai compris",
59 | };
60 |
--------------------------------------------------------------------------------
/src/modules/Auth/containers/Login/components/styles.js:
--------------------------------------------------------------------------------
1 | import styles from "styles";
2 | import colors from "colors";
3 |
4 | const { FontFamily, FontSize } = styles;
5 |
6 | import { ScaledSheet } from "react-native-size-matters/extend";
7 | import { I18nManager } from "react-native";
8 |
9 | export default ScaledSheet.create({
10 | container: {
11 | flex: 1,
12 | backgroundColor:'#fff',
13 | // paddingBottom: "40@vs",
14 | },
15 | back: {
16 | // height: "6@vs",
17 | // width: "12@vs",
18 | height: "25@vs",
19 | width: "25@vs",
20 | left: "10@vs",
21 | top: "20@vs",
22 | },
23 | backContent: {
24 | left: "10@vs",
25 | top: "20@vs",
26 | width: "80@vs",
27 | height: "80@vs",
28 | //borderWidth: 2,
29 | },
30 | logoContent: {
31 | marginBottom: "50@s",
32 | alignItems: "center",
33 | },
34 | logoImage: {
35 | height: "150@vs",
36 | width: "150@vs",
37 | // top: "10@vs",
38 | },
39 | logoText: {
40 | height: "70@vs",
41 | width: "242@vs",
42 | top: "10@vs",
43 | },
44 |
45 | loginText: {
46 | fontFamily: FontFamily.nextBold,
47 | fontSize: FontSize.f30,
48 | color: colors.purple_one,
49 | marginLeft: "28@s",
50 | textAlign: "left",
51 | marginTop: "58@vs",
52 | marginBottom: "32@vs",
53 | // marginBottom: '20@vs',
54 | },
55 | forgetPasswordContainer: {
56 | marginTop: "5@vs",
57 | marginBottom: "50@vs",
58 | alignItems: "center",
59 | },
60 | textbutton: {
61 | fontFamily: "PTSans-Regular",
62 | fontSize: FontSize.f16,
63 | color: "#042B72",
64 | },
65 | cguAndButtonContainer: {
66 | flex: 1,
67 | justifyContent: "flex-end",
68 | paddingBottom: "40@vs",
69 | },
70 | additonalContainerStyle: {
71 | marginTop: "31@vs",
72 | },
73 | contentContainerner: {
74 | flex: 1,
75 | // marginTop: "50@vs",
76 | },
77 | rightIcon: {
78 | width: "20@s",
79 | height: "20@vs",
80 | },
81 | });
82 |
--------------------------------------------------------------------------------
/src/modules/Auth/containers/homePage/components/styles.js:
--------------------------------------------------------------------------------
1 | import styles from "styles";
2 | import colors from "colors";
3 |
4 | const { DeviceWidth, FontFamily } = styles;
5 |
6 | import { ScaledSheet } from "react-native-size-matters/extend";
7 |
8 | export default ScaledSheet.create({
9 | container: {
10 | flex: 1,
11 | },
12 | image: {
13 | height: "59%",
14 | width: DeviceWidth,
15 | alignSelf: "center",
16 | },
17 |
18 | containerText: {
19 | flex: 1,
20 | width: DeviceWidth,
21 | // borderWidth: 0.2,
22 | backgroundColor: "#FFF",
23 | borderRadius: 10,
24 | paddingHorizontal: 10,
25 | paddingVertical: 10,
26 | position: "absolute",
27 | bottom: 0,
28 | height: "400@vs",
29 | borderTopRightRadius: 15,
30 | borderTopLeftRadius: 15,
31 | },
32 | buttonContentStyle: {
33 | // justifyContent: "center",
34 | },
35 | btnText: {
36 | fontFamily: FontFamily.nextSemiBold,
37 | fontSize: "18@ms0.3",
38 | color: colors.white,
39 | textAlign: "center",
40 | },
41 | text: {
42 | // borderWidth: 2,
43 | flexWrap: "nowrap",
44 | alignSelf: "center",
45 | marginTop: "25@vs",
46 | textAlign: "center",
47 | },
48 | title: {
49 | fontFamily: "PTSans-Bold",
50 | fontSize: "20@ms",
51 | width: "360@vs",
52 | color: "#1c3e7f",
53 | textAlign: "center",
54 | alignSelf: "center",
55 | // flexWrap: "nowrap",
56 | },
57 | paragraph: {
58 | alignSelf: "center",
59 | textAlign: "center",
60 | marginTop: "10@vs",
61 | fontSize: "18@ms",
62 | fontFamily: "PTSans-Regular",
63 | color: "#35538d",
64 | width: "360@vs",
65 | },
66 | syndicatContent: {
67 | alignItems: "center",
68 | marginVertical: "5@vs",
69 | },
70 | logoImage: {
71 | height: "60@vs",
72 | width: "70@vs",
73 | top: "10@vs",
74 | },
75 | logoText: {
76 | height: "37@vs",
77 | width: "133@vs",
78 | top: "10@vs",
79 | },
80 | });
81 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
16 |
24 |
25 |
26 |
27 |
28 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/src/modules/Home/components/item/styles.js:
--------------------------------------------------------------------------------
1 | import styles from "styles";
2 | const { FontFamily, FontSize } = styles;
3 |
4 | import { ScaledSheet } from "react-native-size-matters/extend";
5 |
6 | export default ScaledSheet.create({
7 | container: {
8 | borderWidth: 1,
9 | borderColor: "#f3f3f3",
10 | borderRadius: 5,
11 | alignSelf: "center",
12 | width: "360@s",
13 | // height: "179@vs",
14 | marginBottom: 10,
15 | paddingBottom: 5,
16 | overflow:'hidden',
17 | backgroundColor: '#fff'
18 | },
19 | image: {
20 | height: "150@vs",
21 | width: "360@s",
22 | backgroundColor:'#eee',
23 | borderTopRightRadius: 5,
24 | borderTopLeftRadius: 5,
25 | borderRightWidth: 5,
26 | margin:-1
27 | // zIndex: 1,
28 | },
29 | imageContent: {
30 | height: "150@vs",
31 | },
32 | // badgeContent: {
33 | // borderWidth: 2,
34 | // position: "absolute",
35 | // backgroundColor: "#7f7f7f",
36 | // left: 15,
37 | // top: 15,
38 | // },
39 | badgeContent: {
40 | borderWidth: 2,
41 | borderRadius: 5,
42 | borderColor: "transparent",
43 | position: "absolute",
44 | backgroundColor: "rgba(0,0,0,0.5)",
45 | left: 14,
46 | top: 15,
47 | paddingTop: 5,
48 | paddingBottom: 5,
49 | paddingLeft: 10,
50 | paddingRight: 10
51 | },
52 | badge: {
53 | color: "#FFF",
54 | fontSize: FontSize.f14,
55 | fontFamily: "PTSans-Regular",
56 | },
57 | title: {
58 | color: "#042B72",
59 | fontSize: FontSize.f18,
60 | fontFamily: "PTSans-Bold",
61 | marginVertical: "10@vs",
62 | },
63 | description: {
64 | color: "#042B72",
65 | fontSize: FontSize.f16,
66 | fontFamily: "PTSans-Regular",
67 | },
68 | status: {
69 | color: "#DC002E",
70 | fontSize: FontSize.f12,
71 | fontFamily: "PTSans-Bold",
72 | marginTop: "10@vs",
73 | },
74 | descContent: {
75 | marginLeft: 15,
76 | paddingBottom: "10@vs",
77 | },
78 | withoutImage: { marginTop: "55@vs" },
79 | });
80 |
--------------------------------------------------------------------------------
/src/modules/Home/containers/Details/components/styles.js:
--------------------------------------------------------------------------------
1 | import styles from "styles";
2 | import colors from "colors";
3 | const { DeviceWidth, FontSize } = styles;
4 |
5 | import { ScaledSheet } from "react-native-size-matters/extend";
6 | import { I18nManager } from "react-native";
7 |
8 | export default ScaledSheet.create({
9 | container: {
10 | flex: 1,
11 | width: DeviceWidth,
12 | backgroundColor: "#fff",
13 | },
14 | back: {
15 | height: "25@vs",
16 | width: "25@vs",
17 | left: "10@vs",
18 | top: "20@vs",
19 | },
20 | backContent: {
21 | left: "10@vs",
22 | top: "20@vs",
23 | width: "80@vs",
24 | height: "80@vs",
25 | zIndex: 2,
26 | position: "absolute",
27 | },
28 | image: {
29 | height: "150@vs",
30 | width: DeviceWidth,
31 | backgroundColor:"#f9f9f9"
32 | // alignSelf: "center",
33 | },
34 | textContent: {
35 | backgroundColor: "#FFF",
36 | borderTopRightRadius: 15,
37 | borderTopLeftRadius: 15,
38 | paddingHorizontal: 15,
39 | paddingVertical: 10,
40 | position: "absolute",
41 | bottom: 0,
42 | width: DeviceWidth,
43 | },
44 | direction: {
45 | flexDirection: "row",
46 | justifyContent: "space-between",
47 | marginVertical: "15@vs",
48 | marginHorizontal: "5@vs",
49 | },
50 | status: {
51 | color: "#DC002E",
52 | fontSize: FontSize.f12,
53 | fontFamily: "PTSans-Bold",
54 | },
55 | time: {
56 | color: "#838385",
57 | fontSize: FontSize.f14,
58 | fontFamily: "PTSans-Regular",
59 | },
60 | title: {
61 | color: "#042B72",
62 | fontSize: FontSize.f20,
63 | fontFamily: "PTSans-Bold",
64 | marginBottom: "15@vs",
65 | },
66 | publisher: {
67 | color: "#042B72",
68 | fontSize: FontSize.f14,
69 | fontFamily: "PTSans-Bold",
70 | },
71 | description: {
72 | flex: 1
73 | },
74 | fetchContainer: { flex: 1, justifyContent: "center" },
75 | textContentNoImage: { height: "90%" },
76 | textContentImage: { height: "83%" },
77 | });
78 |
--------------------------------------------------------------------------------
/src/modules/CheckAuth/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Flexi Apps.
3 | *
4 | * Async Component to check user logged in.
5 | *
6 | */
7 |
8 | "use strict";
9 |
10 | import React, { useEffect } from "react";
11 | import { View } from "react-native";
12 | // ...
13 | // import { Actions } from "react-native-router-flux";
14 | import { ReactReduxContext } from "react-redux";
15 |
16 | import storage from "../../lib/storage";
17 | import { forceUpdateFromStore } from "../../config/appConfig";
18 | import { useNavigation } from "@react-navigation/native";
19 | import { navigate } from "router/navigator";
20 |
21 | const styles = {
22 | container: {
23 | flex: 1,
24 | backgroundColor: "white",
25 | },
26 | };
27 |
28 |
29 | function CheckAuth() {
30 | useEffect(() => {
31 | const firstLoaded = async () => {
32 | try {
33 | const session = await storage.getSession();
34 | const jwt = await storage.getJWT();
35 | const refresh = await storage.getRefreshJWT();
36 |
37 | // Add debugging logs
38 | console.log('CheckAuth - Session:', session);
39 | console.log('CheckAuth - JWT:', jwt);
40 | console.log('CheckAuth - Refresh:', refresh);
41 |
42 | // check for update required
43 | if (forceUpdateFromStore) {
44 | navigate('ForceUpdate');
45 | } else {
46 | if (
47 | // session &&
48 | // session !== "null" &&
49 | jwt &&
50 | jwt !== "null" &&
51 | refresh &&
52 | refresh !== "null"
53 | ) {
54 | console.log('CheckAuth - Redirecting to List (authenticated)');
55 | navigate('List');
56 | } else {
57 | console.log('CheckAuth - Redirecting to Login (not authenticated)');
58 | navigate('Login');
59 | }
60 | }
61 | } catch (e) {
62 | console.log('CheckAuth - Error:', e);
63 | navigate('Login');
64 | }
65 | }
66 | firstLoaded();
67 | }, []);
68 |
69 | return ;
70 | }
71 |
72 | export default CheckAuth;
73 |
--------------------------------------------------------------------------------
/src/modules/Auth/containers/homePage/components/index.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | import { View, ImageBackground, Text, Image } from "react-native";
4 |
5 | import styles from "./styles";
6 |
7 | //components
8 | import Button from "components/Button";
9 | // ...
10 | // import { Actions } from "react-native-router-flux";
11 |
12 | // ...
13 | // import strings from "config/strings";
14 | import strings from "modules/Auth/locales/fr";
15 | import { navigate } from "router/navigator";
16 |
17 | const HomePage = () => {
18 | return (
19 |
20 |
25 |
26 |
27 |
31 |
35 |
36 |
37 |
38 | {strings.homePage_acceuil}
39 | {strings.homePage_paragraph}
40 |
41 |
42 |
52 |
56 | }
57 | additonalContainerStyle={styles.additonalContainerStyle} onPress={() => {
58 | // ...
59 | // Actions.Login()
60 | navigate('Login');
61 | }}
62 | />
63 |
64 |
65 | );
66 | };
67 |
68 | export default HomePage;
69 |
--------------------------------------------------------------------------------
/src/lib/moment.js:
--------------------------------------------------------------------------------
1 | import moment from 'moment';
2 |
3 | moment.locale('fr', {
4 | months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
5 | '_',
6 | ),
7 | monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
8 | '_',
9 | ),
10 | monthsParseExact: true,
11 | weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
12 | weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
13 | weekdaysMin: 'Di_Lu_Ma_Me_Je_Ve_Sa'.split('_'),
14 | weekdaysParseExact: true,
15 | longDateFormat: {
16 | LT: 'HH:mm',
17 | LTS: 'HH:mm:ss',
18 | L: 'DD/MM/YYYY',
19 | LL: 'D MMMM YYYY',
20 | LLL: 'DD/MM/YYYY HH:mm',
21 | LLLL: 'dddd D MMMM YYYY HH:mm',
22 | },
23 | calendar: {
24 | sameDay: '[Aujourd’hui à] LT',
25 | nextDay: '[Demain à] LT',
26 | nextWeek: 'dddd L',
27 | lastDay: '[Hier à] LT',
28 | lastWeek: 'dddd L',
29 | sameElse: 'L',
30 | },
31 | relativeTime: {
32 | future: 'dans %s',
33 | past: 'il y a %s',
34 | s: 'quelques secondes',
35 | m: 'une minute',
36 | mm: '%d minutes',
37 | h: 'une heure',
38 | hh: '%d heures',
39 | d: 'un jour',
40 | dd: '%d jours',
41 | M: 'un mois',
42 | MM: '%d mois',
43 | y: 'un an',
44 | yy: '%d ans',
45 | },
46 | dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
47 | ordinal: function (number) {
48 | return number + (number === 1 ? 'er' : 'e');
49 | },
50 | meridiemParse: /PD|MD/,
51 | isPM: function (input) {
52 | return input.charAt(0) === 'M';
53 | },
54 | // In case the meridiem units are not separated around 12, then implement
55 | // this function (look at locale/id.js for an example).
56 | // meridiemHour : function (hour, meridiem) {
57 | // return /* 0-23 hour, given meridiem token and hour 1-12 */ ;
58 | // },
59 | meridiem: function (hours, minutes, isLower) {
60 | return hours < 12 ? 'PD' : 'MD';
61 | },
62 | week: {
63 | dow: 1, // Monday is the first day of the week.
64 | doy: 4, // Used to determine first week of the year.
65 | },
66 | });
67 |
68 | export default moment;
69 |
--------------------------------------------------------------------------------
/src/modules/Auth/containers/resetPassword/components/index.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { View, Text, TouchableOpacity, Image, ScrollView } from "react-native";
3 |
4 | //styles
5 | import styles from "./styles";
6 |
7 | // libs
8 | // ...
9 | // import { Actions } from "react-native-router-flux";
10 |
11 | //componens
12 | import Input from "common/components/Input";
13 | import Button from "common/components/Button";
14 | // ...
15 | // import strings from "config/strings";
16 | import strings from "modules/Auth/locales/fr";
17 | import { navigate } from "router/navigator";
18 |
19 | class Login extends React.Component {
20 | state = {
21 | login: "",
22 | };
23 |
24 | resetPassword = () => {
25 | const { login } = this.state;
26 | const paylaod = { login };
27 | // ...
28 | this.props.actions.passwordReset(paylaod);
29 | };
30 |
31 | onPress = () => {
32 | // ...
33 | // Actions.Login();
34 | navigate('Login');
35 | };
36 | render() {
37 | return (
38 |
39 | {/* */}
40 |
41 |
45 |
46 |
50 | {strings.passwordReset}
51 | this.setState({ login })}
55 | />
56 |
57 |
58 |
65 |
66 |
67 |
68 | );
69 | }
70 | }
71 |
72 | export default Login;
73 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx512m -XX:MaxMetaspaceSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
14 | org.gradle.jvmargs=-Xmx4096m -XX:MaxMetaspaceSize=4096m -XX:+HeapDumpOnOutOfMemoryError
15 |
16 | # When configured, Gradle will run in incubating parallel mode.
17 | # This option should only be used with decoupled projects. More details, visit
18 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
19 | # org.gradle.parallel=true
20 |
21 | # AndroidX package structure to make it clearer which packages are bundled with the
22 | # Android operating system, and which are packaged with your app's APK
23 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
24 | android.useAndroidX=true
25 |
26 | # Use this property to specify which architecture you want to build.
27 | # You can also override it from the CLI using
28 | # ./gradlew -PreactNativeArchitectures=x86_64
29 | reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
30 |
31 | # Use this property to enable support to the new architecture.
32 | # This will allow you to use TurboModules and the Fabric render in
33 | # your application. You should enable this flag either if you want
34 | # to write custom TurboModules/Fabric components OR use libraries that
35 | # are providing them.
36 | newArchEnabled=true
37 |
38 | # Automatically convert third-party libraries to use AndroidX
39 | android.enableJetifier=true
40 |
41 | # Version of flipper SDK to use with React Native
42 | FLIPPER_VERSION=0.99.0
43 |
44 | # Use this property to enable or disable the Hermes JS engine.
45 | # If set to false, you will be using JSC instead.
46 | hermesEnabled=true
47 |
48 | org.gradle.daemon=true
49 | org.gradle.parallel=true
50 | org.gradle.configureondemand=true
51 |
52 | # Variable pour build apk et bundle
53 | MYAPP_UPLOAD_STORE_FILE=snpi.keystore
54 | MYAPP_UPLOAD_KEY_ALIAS=snpi-alias
55 | MYAPP_UPLOAD_STORE_PASSWORD=yFAEGHWXPHx1
56 | MYAPP_UPLOAD_KEY_PASSWORD=yFAEGHWXPHx1
--------------------------------------------------------------------------------
/src/modules/Profile/actions/index.js:
--------------------------------------------------------------------------------
1 | // error handler
2 | import reportError from "lib/errorHandler";
3 | import { displayToast } from "lib/interactions";
4 |
5 | // import Api
6 | import { Api } from "api";
7 |
8 | import actions from "../actionsTypes";
9 |
10 | import { Notification, setFollower, userNotification } from "../api";
11 | import { refreshToken, setCurrentUser } from "../../../actions/globalActions";
12 |
13 | /***********************************************/
14 | export const notificationsRequest = () => ({
15 | type: actions.NOTIFICATION_REQUEST,
16 | });
17 |
18 | export const notificationsSuccess = (payload) => ({
19 | type: actions.NOTIFICATION_SUCCESS,
20 | payload,
21 | });
22 |
23 | export const notificationsFailure = (payload) => ({
24 | type: actions.NOTIFICATION_FAILED,
25 | payload,
26 | });
27 |
28 | export const notifications = (id, data) => {
29 | return (dispatch) => {
30 | // async await refreshToken();
31 | dispatch(notificationsRequest());
32 |
33 | Api()
34 | .post(userNotification(id), {
35 | hasNotification: data,
36 | isAccessible: data,
37 | })
38 | .then((data) => {
39 | dispatch(notificationsSuccess(data));
40 | dispatch(setCurrentUser(data?.response));
41 | })
42 | .catch(async (error) => {
43 | if (error?.status_code != undefined && error?.status_code != null && error?.status_code == 401) {
44 | await refreshToken();
45 | notifications(id, data);
46 | }
47 | });
48 | };
49 | };
50 | /***********************************************/
51 | export const followerRequest = () => ({
52 | type: actions.FOLLOWERS_REQUEST,
53 | });
54 |
55 | export const followerSuccess = (payload) => ({
56 | type: actions.FOLLOWERS_SUCCESS,
57 | payload,
58 | });
59 |
60 | export const followerFailure = (payload) => ({
61 | type: actions.FOLLOWERS_FAILED,
62 | payload,
63 | });
64 |
65 | export const follower = () => {
66 | return (dispatch) => {
67 | // async await refreshToken();
68 | dispatch(followerRequest());
69 |
70 | Api()
71 | .get(setFollower())
72 | .then((data) => {
73 | // console.log(data?.response?.news);
74 | dispatch(followerSuccess(data?.response?.news));
75 | })
76 | .catch(async (error) => {
77 | if (error?.status_code != undefined && error?.status_code != null && error?.status_code == 401) {
78 | await refreshToken();
79 | follower();
80 | }
81 | });
82 | };
83 | };
84 |
--------------------------------------------------------------------------------
/android/app/src/main/res/raw/node_modules_reactnativevectoricons_glyphmaps_zocial.json:
--------------------------------------------------------------------------------
1 | {
2 | "acrobat": 61696,
3 | "amazon": 61697,
4 | "android": 61698,
5 | "angellist": 61699,
6 | "aol": 61700,
7 | "appnet": 61701,
8 | "appstore": 61702,
9 | "bitbucket": 61703,
10 | "bitcoin": 61704,
11 | "blogger": 61705,
12 | "buffer": 61706,
13 | "cal": 61707,
14 | "call": 61708,
15 | "cart": 61709,
16 | "chrome": 61710,
17 | "cloudapp": 61711,
18 | "creativecommons": 61712,
19 | "delicious": 61713,
20 | "digg": 61714,
21 | "disqus": 61715,
22 | "dribbble": 61716,
23 | "dropbox": 61717,
24 | "drupal": 61718,
25 | "dwolla": 61720,
26 | "email": 61721,
27 | "eventasaurus": 61722,
28 | "eventbrite": 61723,
29 | "eventful": 61724,
30 | "evernote": 61725,
31 | "facebook": 61726,
32 | "fivehundredpx": 61727,
33 | "flattr": 61728,
34 | "flickr": 61729,
35 | "forrst": 61730,
36 | "foursquare": 61731,
37 | "github": 61732,
38 | "gmail": 61733,
39 | "google": 61734,
40 | "googleplay": 61735,
41 | "googleplus": 61736,
42 | "gowalla": 61737,
43 | "grooveshark": 61738,
44 | "guest": 61739,
45 | "html5": 61740,
46 | "ie": 61741,
47 | "instagram": 61742,
48 | "instapaper": 61743,
49 | "intensedebate": 61744,
50 | "itunes": 61745,
51 | "klout": 61746,
52 | "lanyrd": 61747,
53 | "lastfm": 61748,
54 | "lego": 61749,
55 | "linkedin": 61750,
56 | "lkdto": 61751,
57 | "logmein": 61752,
58 | "macstore": 61753,
59 | "meetup": 61754,
60 | "myspace": 61755,
61 | "ninetyninedesigns": 61756,
62 | "openid": 61757,
63 | "opentable": 61758,
64 | "paypal": 61759,
65 | "persona": 61796,
66 | "pinboard": 61760,
67 | "pinterest": 61761,
68 | "plancast": 61762,
69 | "plurk": 61763,
70 | "pocket": 61764,
71 | "podcast": 61765,
72 | "posterous": 61766,
73 | "print": 61767,
74 | "quora": 61768,
75 | "reddit": 61769,
76 | "rss": 61770,
77 | "scribd": 61771,
78 | "skype": 61772,
79 | "smashing": 61773,
80 | "songkick": 61774,
81 | "soundcloud": 61775,
82 | "spotify": 61776,
83 | "stackoverflow": 61777,
84 | "statusnet": 61778,
85 | "steam": 61779,
86 | "stripe": 61780,
87 | "stumbleupon": 61781,
88 | "tumblr": 61782,
89 | "twitter": 61783,
90 | "viadeo": 61784,
91 | "vimeo": 61785,
92 | "vk": 61786,
93 | "weibo": 61787,
94 | "wikipedia": 61788,
95 | "windows": 61789,
96 | "wordpress": 61790,
97 | "xing": 61791,
98 | "yahoo": 61792,
99 | "ycombinator": 61793,
100 | "yelp": 61794,
101 | "youtube": 61795
102 | }
--------------------------------------------------------------------------------
/src/common/styles/index.js:
--------------------------------------------------------------------------------
1 | import {
2 | Dimensions,
3 | Platform,
4 | PixelRatio,
5 | StatusBar,
6 | I18nManager,
7 | } from 'react-native';
8 | import {RFValue} from 'react-native-responsive-fontsize';
9 | import {getStatusBarHeight} from 'react-native-status-bar-height';
10 |
11 | const {height, width, scale} = Dimensions.get('window');
12 |
13 | export default {
14 | DeviceHeight:
15 | Platform.OS === 'android'
16 | ? Math.trunc(StatusBar.currentHeight) > 24
17 | ? height
18 | : height - StatusBar.currentHeight
19 | : getStatusBarHeight(true) <= 20
20 | ? height - getStatusBarHeight(true)
21 | : height - getStatusBarHeight(true) * 1.815,
22 | DeviceWidth: width,
23 | DeviceScale: scale,
24 | FontSize: {
25 | mostTiny: 10 / PixelRatio.getFontScale(),
26 | tiny: 12 / PixelRatio.getFontScale(),
27 | small: 14 / PixelRatio.getFontScale(),
28 | minMedium: 15 / PixelRatio.getFontScale(),
29 | medium: 16 / PixelRatio.getFontScale(),
30 | big: 18 / PixelRatio.getFontScale(),
31 | large: 20 / PixelRatio.getFontScale(),
32 | yLarge: 22 / PixelRatio.getFontScale(),
33 | xLarge: 25 / PixelRatio.getFontScale(),
34 | xxLarge: 28 / PixelRatio.getFontScale(),
35 | xxxLarge: 30 / PixelRatio.getFontScale(),
36 | mostLarge: 47 / PixelRatio.getFontScale(),
37 | f8: RFValue(8, 812),
38 | f10: RFValue(10, 812),
39 | f11: RFValue(11, 812),
40 | f12: RFValue(12, 812),
41 | f13: RFValue(13, 812),
42 | f14: RFValue(14, 812),
43 | f15: RFValue(15, 812),
44 | f16: RFValue(16, 812),
45 | f17: RFValue(17, 812),
46 | f18: RFValue(18, 812),
47 | f19: RFValue(19, 812),
48 | f20: RFValue(20, 812),
49 | f25: RFValue(25, 812),
50 | f30: RFValue(30, 812),
51 | },
52 | FontFamily: {
53 | nextMedium: 'Metropolis-Medium',
54 | nextSemiBold: 'Metropolis-SemiBold',
55 | nextRegular: 'Metropolis-Regular',
56 | nextBold: 'Metropolis-Bold',
57 | },
58 | BorderRadius: {
59 | tiny: 12 / PixelRatio.getFontScale(),
60 | small: 14 / PixelRatio.getFontScale(),
61 | medium: 16 / PixelRatio.getFontScale(),
62 | big: 18 / PixelRatio.getFontScale(),
63 | large: 20 / PixelRatio.getFontScale(),
64 | maxLarge: 23 / PixelRatio.getFontScale(),
65 | maxXLarge: 40 / PixelRatio.getFontScale(),
66 | },
67 | Shadow: {
68 | backgroundColor: 'white',
69 | elevation: 2,
70 | shadowColor: 'black',
71 | shadowOffset: {width: 0, height: 2},
72 | shadowOpacity: 0.3,
73 | shadowRadius: 1,
74 | },
75 | activeOpacity: 0.6, //for TouchableOpacity when we pressed
76 | };
77 |
--------------------------------------------------------------------------------
/src/api/api.js:
--------------------------------------------------------------------------------
1 | import CONFIG from "config/api";
2 | import storage from "lib/storage";
3 | import abortController from "lib/abortController";
4 |
5 | import {
6 | loginUrl,
7 | } from "modules/Auth/api/endpoints";
8 |
9 | const { API_BASE_URL } = CONFIG;
10 | const baseURL = `${API_BASE_URL}`;
11 |
12 | const publicUrls = [
13 | `${baseURL}${loginUrl()}`,
14 | `${baseURL}/cgus/application`,
15 | ];
16 |
17 | const Api = () => {
18 | const core = async (url, method, data, isForm) => {
19 | try {
20 | const { result_session, result_jwt } = await storage.getPermissions();
21 |
22 | const isPublic = publicUrls.includes(url);
23 | const headers = {
24 | Accept: "application/json",
25 | "Content-Type": isForm ? "multipart/form-data" : "application/json",
26 | };
27 |
28 | // Add token and session headers for protected endpoints
29 | if (!isPublic && result_jwt) {
30 | headers["Authorization"] = `Bearer ${result_jwt}`;
31 | }
32 | if (!isPublic && result_session) {
33 | headers["Cookie"] = result_session;
34 | }
35 |
36 | const fetchParams = {
37 | method,
38 | headers,
39 | body: method !== "GET" ? (isForm ? data : JSON.stringify(data)) : undefined,
40 | signal: abortController.getInstance().signal,
41 | };
42 |
43 | const response = await fetch(url, fetchParams);
44 |
45 | // Save any auth-related headers back to storage
46 | const ckie = response?.headers?.get("set-cookie");
47 | const authToken = response?.headers?.get("x-auth-token");
48 | const refreshToken = response?.headers?.get("x-refresh-token");
49 |
50 | if (ckie) storage.setSession(ckie);
51 | if (authToken) storage.setJWT(authToken);
52 | if (refreshToken) storage.setRefreshJWT(refreshToken);
53 |
54 | if (response.ok) {
55 | return await response.json();
56 | } else {
57 | const error = await response.json().catch(() => null);
58 | throw error || new Error("API Error");
59 | }
60 | } catch (err) {
61 | if (err.name === "AbortError") {
62 | throw new Error("Request was aborted.");
63 | }
64 | throw err;
65 | }
66 | };
67 |
68 | return {
69 | get: (path) => core(`${baseURL}${path}`, "GET"),
70 | post: (path, payload, isForm = false) =>
71 | core(`${baseURL}${path}`, "POST", payload, isForm),
72 | put: (path, payload) =>
73 | core(`${baseURL}${path}`, "PUT", payload),
74 | delete: (path) =>
75 | core(`${baseURL}${path}`, "DELETE"),
76 | cancelRequest: () => {
77 | abortController.getInstance().abort();
78 | },
79 | };
80 | };
81 |
82 | export default Api;
83 |
--------------------------------------------------------------------------------
/src/modules/Profile/containers/compte/components/styles.js:
--------------------------------------------------------------------------------
1 | import styles from "styles";
2 | import colors from "colors";
3 | const { FontFamily, FontSize } = styles;
4 |
5 | import { ScaledSheet } from "react-native-size-matters/extend";
6 |
7 | export default ScaledSheet.create({
8 | container: {
9 | flex: 1,
10 | paddingVertical: 15,
11 | backgroundColor:'#fff',
12 | paddingBottom: "40@vs",
13 |
14 | },
15 | hedaerContent: {
16 | flexDirection: "row",
17 | top: "10@vs",
18 | justifyContent: "space-between",
19 | },
20 | back: {
21 | height: "25@vs",
22 | width: "25@vs",
23 | top: "-5@vs",
24 | },
25 | backContent: {
26 | left: "10@vs",
27 | width: "80@vs",
28 | height: "80@vs",
29 | justifyContent: "center",
30 | },
31 | title: {
32 | color: "#000000",
33 | fontSize: 16,
34 | fontFamily: "PTSans-Bold",
35 | textAlign: "center",
36 | top: 20,
37 | position: 'absolute',
38 | left: 50,
39 | right: 50
40 | },
41 | profile: {
42 | alignItems: "center",
43 | // top: 35,
44 | // flex: 1,
45 | // borderWidth: 1,
46 | },
47 | image: {
48 | borderRadius: "50@vs",
49 | backgroundColor:'#f9f9f9',
50 | width: "100@vs",
51 | height: "100@vs",
52 | },
53 | fullName: {
54 | color: "#042B72",
55 | fontSize: 20,
56 | fontFamily: "PTSans-Bold",
57 | top: 10,
58 | },
59 | choices: {
60 | // borderWidth: 1,
61 | flex: 1,
62 | top: "35@vs",
63 | },
64 | choiceContent: {
65 | backgroundColor: "#f3f5f8",
66 | padding: 15,
67 | borderRadius: 10,
68 | marginHorizontal: 15,
69 | marginVertical: "5@vs",
70 | flexDirection: "row",
71 | justifyContent: "space-between",
72 | },
73 | logoutContent: {
74 | backgroundColor: "#f3f5f8",
75 | padding: 15,
76 | borderRadius: 10,
77 | marginHorizontal: 15,
78 | marginVertical: "5@vs",
79 | // paddingBottom: "40@vs",
80 | },
81 | choice: {
82 | color: "#042B72",
83 | fontSize: 16,
84 | fontFamily: "PTSans-Bold",
85 | },
86 | descContent: {
87 | // borderWidth: 1,
88 | width: "90%",
89 | alignSelf: "center",
90 | fontFamily: "PTSans-Regular",
91 | fontSize: 14,
92 | marginBottom: "15@vs",
93 | },
94 | textDesc: {
95 | color: "#5C75A2",
96 | lineHeight: "20@vs",
97 | },
98 | link: {
99 | color: "#042B72",
100 | top: 2,
101 | },
102 | logout: {
103 | color: "#DC072E",
104 | fontSize: 16,
105 | fontFamily: "PTSans-Bold",
106 | alignSelf: "center"
107 | },
108 | chevron: {
109 | alignSelf: "center",
110 | height: "13@vs",
111 | width: "7@vs",
112 | },
113 | });
114 |
--------------------------------------------------------------------------------
/src/router/index.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { TouchableOpacity, View, Text } from 'react-native';
3 | import { createStackNavigator } from '@react-navigation/stack';
4 | import Icons from 'react-native-vector-icons/AntDesign';
5 | import CheckAuth from 'modules/CheckAuth';
6 | import Login from "modules/Auth/containers/Login"
7 | import ResetPassword from 'modules/Auth/containers/resetPassword';
8 | import PasswordMessage from 'modules/Auth/containers/passwordMessage';
9 | import Home from 'modules/Auth/containers/homePage';
10 | import List from 'modules/Home/containers/Home'
11 | import Details from 'modules/Home/containers/Details';
12 | import Profile from 'modules/Profile/containers/compte'
13 | import Notifications from 'modules/Profile/containers/notifications';
14 | import Abonnements from 'modules/Profile/containers/followers';
15 | import Card from 'modules/Profile/containers/card';
16 | import ForceUpdate from 'modules/ForceUpdate/containers';
17 |
18 |
19 | const Rootstack = () => {
20 | const Stack = createStackNavigator();
21 |
22 | return (
23 |
24 | {/* */}
25 |
29 | {/* AUTH */}
30 |
31 |
35 |
39 |
43 |
47 |
48 | {/* Home */}
49 |
50 |
54 |
58 |
59 | {/* Profile */}
60 |
61 |
65 |
69 |
73 |
77 |
78 | {/* ForceUpdate / Update From Store*/}
79 |
83 |
84 | );
85 | }
86 |
87 | export default Rootstack;
--------------------------------------------------------------------------------
/src/modules/Home/components/item/index.js:
--------------------------------------------------------------------------------
1 | // tools
2 | import React from "react";
3 | //rn comp
4 | import { Image, Text, TouchableOpacity, View } from "react-native";
5 | // nav
6 | // ...
7 | // import { Actions } from "react-native-router-flux";
8 | // styles
9 | import styles from "./styles";
10 | // libs
11 | import { Capitalize } from "lib/Capitalise";
12 | import strings from "locales/fr";
13 | import gaSendLoadAppEvent from "services/ga-api";
14 | import { useSelector } from "react-redux";
15 | import { navigate } from "router/navigator";
16 | import Details from "modules/Home/containers/Details";
17 |
18 | export default ({ data }) => {
19 | const currentUser = useSelector(
20 | (state) => state.global.currentUser
21 | );
22 |
23 | const getElapsedTime = (date) => {
24 |
25 | let diff = {}
26 | let tmp = Date.now() - date;
27 |
28 | tmp = Math.floor(tmp / 1000);
29 | diff.sec = tmp % 60;
30 |
31 | tmp = Math.floor((tmp - diff.sec) / 60);
32 | diff.min = tmp % 60;
33 |
34 | tmp = Math.floor((tmp - diff.min) / 60);
35 | diff.hour = tmp % 24;
36 |
37 | tmp = Math.floor((tmp - diff.hour) / 24);
38 | diff.day = tmp;
39 |
40 | if (diff.day > 365)
41 | return "Il y a plus d'un an"
42 | else if (diff.day > 1)
43 | return "Il y a " + diff.day + " jours"
44 | else if (diff.hour > 1)
45 | return "Il y a " + diff.hour + " heures"
46 | else if (diff.min > 1)
47 | return "Il y a " + diff.min + " minutes"
48 | else
49 | return "Il y a " + diff.sec + " secondes"
50 | }
51 | const badgeDate = (data) => {
52 | return {getElapsedTime(data)};
53 | };
54 |
55 | return (
56 | {
57 |
58 | // Track GA Open News EVENTS
59 | gaSendLoadAppEvent(currentUser?.id?.toString(), "news_click", { "newsId": data?.id });
60 | // ...
61 | // Actions.Details({ data: data });
62 | // navigate('Details', { data: data });
63 | navigate("Details", { data: data });
64 |
65 | }} activeOpacity={0.8}>
66 |
67 | {data?.thumbnail ? (
68 |
69 |
70 |
71 | ) : (
72 |
73 | {badgeDate(data?.modifiedAt)}
74 |
75 | )}
76 |
77 |
78 | {data?.featured &&
79 | {strings.featured}
80 | }
81 | {data?.title.toUpperCase()}
82 | {Capitalize(data?.label)}
83 |
84 |
85 |
86 | );
87 | };
88 |
--------------------------------------------------------------------------------
/src/modules/Profile/containers/followers/components/styles.js:
--------------------------------------------------------------------------------
1 | import styles from 'styles';
2 | import colors from 'colors';
3 | const { FontFamily, FontSize } = styles;
4 |
5 | import { ScaledSheet } from 'react-native-size-matters/extend';
6 |
7 | export default ScaledSheet.create({
8 | container: {
9 | flex: 1,
10 | backgroundColor: '#FFFFFF',
11 | },
12 | hedaerContent: {
13 | flexDirection: 'row',
14 | top: '10@vs',
15 | justifyContent: 'space-between',
16 | },
17 | back: {
18 | // height: "6@vs",
19 | // width: "12@vs",
20 | height: '25@vs',
21 | width: '25@vs',
22 | // left: "10@vs",
23 | top: '-5@vs',
24 | },
25 | backContent: {
26 | left: '10@vs',
27 | // top: "20@vs",
28 | width: '80@vs',
29 | height: '80@vs',
30 | // borderWidth: 2,
31 | justifyContent: 'center',
32 | },
33 | title: {
34 | color: '#000000',
35 | fontSize: 16,
36 | fontFamily: 'PTSans-Bold',
37 | textAlign: 'center',
38 | top: 20,
39 | position: 'absolute',
40 | left: 50,
41 | right: 50,
42 | },
43 | choices: {
44 | // top: 25,
45 | },
46 | switchtitle: {
47 | backgroundColor: '#fff',
48 | // padding: "20@vs",
49 | height: '50@s',
50 | borderRadius: 10,
51 | marginHorizontal: 15,
52 | marginTop: 10,
53 | marginBottom: 25,
54 | flexDirection: 'row',
55 | justifyContent: 'space-between',
56 | alignItems: 'center',
57 | paddingHorizontal: '15@vs',
58 | },
59 | choiceContent: {
60 | backgroundColor: '#f3f5f8',
61 | paddingHorizontal: 10,
62 | borderRadius: 10,
63 | marginHorizontal: 15,
64 | marginVertical: '5@vs',
65 | flexDirection: 'row',
66 | justifyContent: 'space-between',
67 | height: '50@vs',
68 | alignItems: 'center',
69 | },
70 | choice: {
71 | color: '#042B72',
72 | fontSize: 16,
73 | fontFamily: 'PTSans-Bold',
74 | },
75 | newsTitle: {
76 | color: '#042B72',
77 | fontSize: 12,
78 | fontFamily: 'PTSans-Bold',
79 | textAlign: 'left',
80 | // marginTop: "30@vs",
81 | left: '20@s',
82 | // right: 100,
83 | },
84 | items: {
85 | color: '#042B72',
86 | fontSize: 16,
87 | fontFamily: 'PTSans-Bold',
88 | },
89 | unselected: {
90 | width: 25,
91 | height: 25,
92 | backgroundColor: '#f3f5f8',
93 | borderWidth: 2,
94 | alignSelf: 'center',
95 | borderRadius: 5,
96 | borderColor: '#2a4b87',
97 | },
98 | selected: {
99 | width: 25,
100 | height: 25,
101 | backgroundColor: '#042b72',
102 | // borderWidth: 2,
103 | alignSelf: 'center',
104 | borderRadius: 5,
105 | borderColor: '#2a4b87',
106 | paddingVertical: '3@vs',
107 | textAlign: 'center',
108 | paddingLeft: '4@vs',
109 | },
110 | checkIcon: {
111 | width: 20,
112 | height: 20,
113 | resizeMode: 'contain',
114 | },
115 | });
116 |
--------------------------------------------------------------------------------
/src/modules/Home/actions/index.js:
--------------------------------------------------------------------------------
1 | // error handler
2 | import reportError from "lib/errorHandler";
3 | import { displayToast } from "lib/interactions";
4 |
5 | // import Api
6 | import { Api } from "api";
7 |
8 | import actions from "../actionsTypes";
9 |
10 | //lib
11 | import { getList, getOne } from "../api";
12 | import {getMe, refreshToken} from "../../../actions/globalActions";
13 | // ...
14 | // import {Actions} from "react-native-router-flux";
15 | import {logoutUser} from "../../Auth/actions";
16 |
17 | /** List */
18 | export const listRequest = () => ({
19 | type: actions.LIST_REQUEST,
20 | });
21 |
22 | export const listRequestSuccess = (payload) => ({
23 | type: actions.LIST_SUCCESS,
24 | payload,
25 | });
26 |
27 | export const listRequestFailure = (payload) => ({
28 | type: actions.LIST_FAILED,
29 | payload,
30 | });
31 |
32 | export const listFormations = (limit, offset, sort, order, hasRetry = false) => {
33 | const l = limit,
34 | of = offset,
35 | s = sort,
36 | or = order;
37 |
38 | return (dispatch) => {
39 |
40 | //async await refreshToken();
41 |
42 | dispatch(listRequest());
43 | Api()
44 | .get(getList(limit, offset, sort, order))
45 | .then((data) => {
46 | dispatch(listRequestSuccess(data));
47 | })
48 | .catch(async (err) => {
49 |
50 | // Manage token expire
51 | if (!hasRetry) {// OLD : if (error.status_code == 401) {
52 | await refreshToken();
53 | dispatch(listFormations(l, of, s, or, true));
54 | }
55 | // REFRESH TOKEN EXPIRE => LOGOUT
56 | else if (err?.status_code != undefined && err?.status_code != null && err?.status_code == 401) {
57 | dispatch(logoutUser())
58 | }
59 | else {
60 | dispatch(listRequestFailure());
61 | }
62 |
63 | });
64 | };
65 | };
66 |
67 | /** GET ONE */
68 | export const getOneRequest = () => ({
69 | type: actions.GET_ONE_REQUEST,
70 | });
71 |
72 | export const getOneRequestSuccess = (payload) => ({
73 | type: actions.GET_ONE_SUCCESS,
74 | payload,
75 | });
76 |
77 | export const getOneRequestFailure = (payload) => ({
78 | type: actions.GET_ONE_FAILED,
79 | payload,
80 | });
81 |
82 | export const oneNews = (id) => {
83 | // const id = id;
84 | return (dispatch) => {
85 | //async await refreshToken();
86 | dispatch(getOneRequest());
87 | Api()
88 | .get(getOne(id))
89 | .then((data) => {
90 | dispatch(getOneRequestSuccess(data));
91 | })
92 | .catch(async (error) => {
93 | if (error?.status_code != undefined && error?.status_code != null && error?.status_code == 401) {
94 | await refreshToken();
95 | dispatch(oneNews(id));
96 | } else {
97 | console.log("error", error);
98 | displayToast(error?.status_text);
99 | dispatch(getOneRequestFailure());
100 | }
101 | });
102 | };
103 | };
104 |
--------------------------------------------------------------------------------
/src/actions/globalActions.js:
--------------------------------------------------------------------------------
1 | // Api
2 | import { Api } from "api";
3 |
4 | // some endpoints
5 | import { meUrl, canalsUrl, refresh } from "api/endpoints";
6 |
7 | // import actions types
8 | import {
9 | SET_ONE_SIGNAL_ID,
10 | SET_SELECTED_LANGUAGE,
11 | SET_CURRENT_USER,
12 | SET_IS_GUEST,
13 | SET_USER_CONVER,
14 | REFRESH_REQUEST,
15 | REFRESH_SUCCESS,
16 | REFRESH_FAILED,
17 | } from "actionsTypes";
18 |
19 | //lib
20 | import { displaySessionToast, displayToast } from "lib/interactions";
21 | import { reportError } from "lib/errorHandler";
22 | import storage from "../lib/storage";
23 |
24 | export const setCurrentUser = (payload) => ({
25 | type: SET_CURRENT_USER,
26 | payload,
27 | });
28 |
29 | export const setIsGuest = (payload) => ({
30 | type: SET_IS_GUEST,
31 | payload,
32 | });
33 |
34 | // export const setOneSignalId = (payload) => ({
35 | // type: SET_ONE_SIGNAL_ID,
36 | // payload,
37 | // });
38 |
39 | export const setLanguage = (payload) => ({
40 | type: SET_SELECTED_LANGUAGE,
41 | payload,
42 | });
43 |
44 | export const getMe = () => {
45 | return (dispatch) => {
46 | Api()
47 | .get(meUrl())
48 | .then((data) => {
49 | if (data) {
50 | console.log(data)
51 | dispatch(setCurrentUser(data?.response));
52 | } else {
53 | displaySessionToast();
54 | }
55 | })
56 | .catch(async (err) => {
57 | if (err?.status_code != undefined && err?.status_code != null && err?.status_code == 401) {
58 | await refreshToken();
59 | dispatch(getMe());
60 | }
61 | else {
62 | reportError("get me error", err);
63 | }
64 | });
65 | };
66 | };
67 |
68 | export const setConver = (payload) => ({
69 | type: SET_USER_CONVER,
70 | payload,
71 | });
72 |
73 | export const canalsFetch = (params) => {
74 | return (dispatch) => {
75 | Api()
76 | .get(canalsUrl(params))
77 | .then((data) => {
78 | if (data && data.value && data.value[0]) {
79 | dispatch(setConver(data.value[0]));
80 | }
81 | })
82 | .catch(async (err) => {
83 | if (err?.status_code != undefined && err?.status_code != null && err?.status_code == 401) {
84 | await refreshToken();
85 | dispatch(getMe());
86 | }
87 | else {
88 | displayToast(error?.message);
89 | reportError(error);
90 | }
91 | });
92 | };
93 | };
94 | /** REFRESH TOKEN */
95 | export const refreshRequest = () => ({
96 | type: REFRESH_REQUEST,
97 | });
98 |
99 | export const refreshSuccess = () => ({
100 | type: REFRESH_SUCCESS,
101 | });
102 |
103 | export const refreshFailure = () => ({
104 | type: REFRESH_FAILED,
105 | });
106 |
107 | export const refreshToken = async () => {
108 | const jwt = await storage.getRefreshJWT();
109 |
110 | return Api()
111 | .post(refresh(), { refresh_token: jwt })
112 | .then(() => {})
113 | .catch(() => {});
114 | };
115 |
--------------------------------------------------------------------------------
/src/modules/Profile/containers/card/components/styles.js:
--------------------------------------------------------------------------------
1 | import styles from "styles";
2 | import colors from "colors";
3 | const { FontFamily, FontSize } = styles;
4 |
5 | import { ScaledSheet } from "react-native-size-matters/extend";
6 |
7 | export default ScaledSheet.create({
8 | container: {
9 | flex: 1,
10 | backgroundColor:'#FFFFFF',
11 | },
12 | hedaerContent: {
13 | flexDirection: "row",
14 | top: "20@vs",
15 | justifyContent: "space-between",
16 | },
17 | back: {
18 | // height: "6@vs",
19 | // width: "12@vs",
20 | height: "25@vs",
21 | width: "25@vs",
22 | // left: "10@vs",
23 | top: "-5@vs",
24 | },
25 | backContent: {
26 | left: "10@vs",
27 | // top: "20@vs",
28 | width: "80@vs",
29 | height: "80@vs",
30 | // borderWidth: 2,
31 | justifyContent: "center",
32 | },
33 | title: {
34 | color: "#000000",
35 | fontSize: 16,
36 | fontFamily: "PTSans-Bold",
37 | textAlign: "center",
38 | top: 30,
39 | position: 'absolute',
40 | left: 50,
41 | right: 50
42 | },
43 | subtitle: {
44 | marginLeft: "2%",
45 | color: "#000000",
46 | fontSize: 16,
47 | fontFamily: "PTSans-Bold",
48 | },
49 | closeButton: {
50 | height: '16@vs',
51 | width: '16@s',
52 | },
53 | choices: {
54 | // top: 25,
55 | },
56 | switchtitle: {
57 | backgroundColor: "#fff",
58 | // padding: "20@vs",
59 | height: "50@s",
60 | borderRadius: 10,
61 | marginHorizontal: 15,
62 | marginTop: 10,
63 | marginBottom: 25,
64 | flexDirection: "row",
65 | justifyContent: "space-between",
66 | alignItems: "center",
67 | paddingHorizontal: "15@vs",
68 | },
69 | choiceContent: {
70 | backgroundColor: "#f3f5f8",
71 | paddingHorizontal: 10,
72 | borderRadius: 10,
73 | marginHorizontal: 15,
74 | marginVertical: "5@vs",
75 | flexDirection: "row",
76 | justifyContent: "space-between",
77 | height: "50@vs",
78 | alignItems: "center",
79 | },
80 | choice: {
81 | color: "#042B72",
82 | fontSize: 16,
83 | fontFamily: "PTSans-Bold",
84 | },
85 | newsTitle: {
86 | color: "#042B72",
87 | fontSize: 12,
88 | fontFamily: "PTSans-Bold",
89 | textAlign: "left",
90 | // marginTop: "30@vs",
91 | left: "20@s",
92 | // right: 100,
93 | },
94 | items: {
95 | color: "#042B72",
96 | fontSize: 16,
97 | fontFamily: "PTSans-Bold",
98 | },
99 | unselected: {
100 | width: 25,
101 | height: 25,
102 | backgroundColor: "#f3f5f8",
103 | borderWidth: 2,
104 | alignSelf: "center",
105 | borderRadius: 5,
106 | borderColor: "#2a4b87",
107 | },
108 | selected: {
109 | width: 25,
110 | height: 25,
111 | backgroundColor: "#042b72",
112 | // borderWidth: 2,
113 | alignSelf: "center",
114 | borderRadius: 5,
115 | borderColor: "#2a4b87",
116 | paddingVertical: "3@vs",
117 | textAlign: "center",
118 | paddingLeft: "4@vs",
119 | },
120 | });
121 |
--------------------------------------------------------------------------------
/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @REM Copyright (c) Meta Platforms, Inc. and affiliates.
2 | @REM
3 | @REM This source code is licensed under the MIT license found in the
4 | @REM LICENSE file in the root directory of this source tree.
5 |
6 | @rem
7 | @rem Copyright 2015 the original author or authors.
8 | @rem
9 | @rem Licensed under the Apache License, Version 2.0 (the "License");
10 | @rem you may not use this file except in compliance with the License.
11 | @rem You may obtain a copy of the License at
12 | @rem
13 | @rem https://www.apache.org/licenses/LICENSE-2.0
14 | @rem
15 | @rem Unless required by applicable law or agreed to in writing, software
16 | @rem distributed under the License is distributed on an "AS IS" BASIS,
17 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 | @rem See the License for the specific language governing permissions and
19 | @rem limitations under the License.
20 | @rem
21 | @rem SPDX-License-Identifier: Apache-2.0
22 | @rem
23 |
24 | @if "%DEBUG%"=="" @echo off
25 | @rem ##########################################################################
26 | @rem
27 | @rem Gradle startup script for Windows
28 | @rem
29 | @rem ##########################################################################
30 |
31 | @rem Set local scope for the variables with windows NT shell
32 | if "%OS%"=="Windows_NT" setlocal
33 |
34 | set DIRNAME=%~dp0
35 | if "%DIRNAME%"=="" set DIRNAME=.
36 | @rem This is normally unused
37 | set APP_BASE_NAME=%~n0
38 | set APP_HOME=%DIRNAME%
39 |
40 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
41 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
42 |
43 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
44 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
45 |
46 | @rem Find java.exe
47 | if defined JAVA_HOME goto findJavaFromJavaHome
48 |
49 | set JAVA_EXE=java.exe
50 | %JAVA_EXE% -version >NUL 2>&1
51 | if %ERRORLEVEL% equ 0 goto execute
52 |
53 | echo. 1>&2
54 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
55 | echo. 1>&2
56 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2
57 | echo location of your Java installation. 1>&2
58 |
59 | goto fail
60 |
61 | :findJavaFromJavaHome
62 | set JAVA_HOME=%JAVA_HOME:"=%
63 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
64 |
65 | if exist "%JAVA_EXE%" goto execute
66 |
67 | echo. 1>&2
68 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
69 | echo. 1>&2
70 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2
71 | echo location of your Java installation. 1>&2
72 |
73 | goto fail
74 |
75 | :execute
76 | @rem Setup the command line
77 |
78 | set CLASSPATH=
79 |
80 |
81 | @rem Execute Gradle
82 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
83 |
84 | :end
85 | @rem End local scope for the variables with windows NT shell
86 | if %ERRORLEVEL% equ 0 goto mainEnd
87 |
88 | :fail
89 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
90 | rem the _cmd.exe /c_ return code!
91 | set EXIT_CODE=%ERRORLEVEL%
92 | if %EXIT_CODE% equ 0 set EXIT_CODE=1
93 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
94 | exit /b %EXIT_CODE%
95 |
96 | :mainEnd
97 | if "%OS%"=="Windows_NT" endlocal
98 |
99 | :omega
100 |
--------------------------------------------------------------------------------
/ios/SNPINews.xcodeproj/xcshareddata/xcschemes/SNPINews.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
53 |
55 |
61 |
62 |
63 |
64 |
70 |
72 |
78 |
79 |
80 |
81 |
83 |
84 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "snpiNews",
3 | "version": "2.0.1",
4 | "private": true,
5 | "scripts": {
6 | "android": "react-native run-android",
7 | "ios": "react-native run-ios",
8 | "lint": "eslint .",
9 | "start": "react-native start",
10 | "test": "jest",
11 | "open-studio": "open -a /Applications/Android ./android",
12 | "android-staging": "cat src/config/api-staging.js > src/config/api.js && react-native run-android",
13 | "android-production": "cat src/config/api-production.js > src/config/api.js && react-native run-android",
14 | "build-staging": "cat src/config/api-staging.js > src/config/api.js && cd android && ./gradlew assembleRelease",
15 | "build-production": "cat src/config/api-production.js > src/config/api.js && cd android && ./gradlew assembleRelease",
16 | "build-staging-store": "cat src/config/api-staging.js > src/config/api.js && cd android && ./gradlew bundleRelease",
17 | "build-production-store": "cat src/config/api-production.js > src/config/api.js && cd android && ./gradlew bundleRelease",
18 | "test-android": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res && cd android && ./gradlew assembleDebug"
19 | },
20 | "dependencies": {
21 | "@react-native-async-storage/async-storage": "^2.2.0",
22 | "@react-native-community/netinfo": "^11.4.1",
23 | "@react-native-community/push-notification-ios": "^1.11.0",
24 | "@react-native-masked-view/masked-view": "^0.3.2",
25 | "@react-navigation/native": "^7.1.14",
26 | "@react-navigation/stack": "^7.4.2",
27 | "@reduxjs/toolkit": "^2.8.2",
28 | "jetifier": "^2.0.0",
29 | "lodash": "^4.17.21",
30 | "minimist": "^1.2.8",
31 | "moment": "^2.30.1",
32 | "react": "19.1.0",
33 | "react-devtools": "^6.1.5",
34 | "react-dom": "^19.1.0",
35 | "react-native": "0.80.1",
36 | "react-native-auto-height-image": "^3.2.4",
37 | "react-native-gesture-handler": "^2.27.2",
38 | "react-native-linear-gradient": "^2.8.3",
39 | "react-native-localization": "^2.3.2",
40 | "react-native-open-pdf": "^0.0.2",
41 | "react-native-popup-menu": "^0.18.0",
42 | "react-native-reanimated": "^4.0.0",
43 | "react-native-responsive-fontsize": "^0.5.1",
44 | "react-native-safe-area-context": "^5.5.2",
45 | "react-native-screens": "^4.13.1",
46 | "react-native-size-matters": "^0.4.2",
47 | "react-native-splash-screen": "^3.3.0",
48 | "react-native-status-bar-height": "^2.6.0",
49 | "react-native-svg": "^15.12.0",
50 | "react-native-vector-icons": "^10.2.0",
51 | "react-native-webview": "^13.15.0",
52 | "react-native-wonderpush": "^2.4.0",
53 | "react-native-worklets": "^0.4.0",
54 | "react-redux": "^9.2.0",
55 | "redux": "^5.0.1",
56 | "redux-devtools-extension": "^2.13.9",
57 | "redux-promise": "^0.6.0",
58 | "validate.js": "^0.13.1"
59 | },
60 | "devDependencies": {
61 | "@babel/core": "^7.25.2",
62 | "@babel/preset-env": "^7.25.3",
63 | "@babel/runtime": "^7.25.0",
64 | "@react-native-community/cli": "19.0.0",
65 | "@react-native-community/cli-platform-android": "19.0.0",
66 | "@react-native-community/cli-platform-ios": "19.0.0",
67 | "@react-native/babel-preset": "0.80.1",
68 | "@react-native/eslint-config": "0.80.1",
69 | "@react-native/metro-config": "0.80.1",
70 | "@react-native/typescript-config": "0.80.1",
71 | "@types/jest": "^29.5.13",
72 | "@types/react": "^19.1.0",
73 | "@types/react-test-renderer": "^19.1.0",
74 | "babel-plugin-dotenv-import": "^3.0.1",
75 | "babel-plugin-module-resolver": "^5.0.2",
76 | "eslint": "^8.19.0",
77 | "jest": "^29.6.3",
78 | "prettier": "^2.8.8",
79 | "react-test-renderer": "19.1.0",
80 | "typescript": "5.0.4"
81 | },
82 | "engines": {
83 | "node": ">=18"
84 | }
85 | }
86 |
--------------------------------------------------------------------------------