├── .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 |