├── .buckconfig
├── .bundle
└── config
├── .eslintrc.js
├── .expo
├── README.md
├── devices.json
├── packager-info.json
└── settings.json
├── .gitignore
├── .node-version
├── .prettierrc.js
├── .ruby-version
├── .vscode
└── settings.json
├── .watchmanconfig
├── AllDates.json
├── App.tsx
├── Gemfile
├── README.md
├── __tests__
└── App-test.tsx
├── android
├── app
│ ├── _BUCK
│ ├── build.gradle
│ ├── build_defs.bzl
│ ├── debug.keystore
│ ├── google-services.json
│ ├── proguard-rules.pro
│ └── src
│ │ ├── debug
│ │ ├── AndroidManifest.xml
│ │ └── java
│ │ │ └── com
│ │ │ └── fronend
│ │ │ └── ReactNativeFlipper.java
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── assets
│ │ ├── fonts
│ │ │ ├── Montserrat-Light.ttf
│ │ │ ├── Montserrat-Medium.ttf
│ │ │ ├── Montserrat-MediumItalic.ttf
│ │ │ ├── Montserrat-Regular.ttf
│ │ │ ├── Montserrat-Thin.ttf
│ │ │ ├── Report-Regular.ttf
│ │ │ └── SansSerifFLF.otf
│ │ ├── privacy.pdf
│ │ └── term_of_use.pdf
│ │ ├── java
│ │ └── com
│ │ │ └── fronend
│ │ │ ├── MainActivity.java
│ │ │ ├── MainApplication.java
│ │ │ └── newarchitecture
│ │ │ ├── MainApplicationReactNativeHost.java
│ │ │ ├── components
│ │ │ └── MainComponentsRegistry.java
│ │ │ └── modules
│ │ │ └── MainApplicationTurboModuleManagerDelegate.java
│ │ ├── jni
│ │ ├── CMakeLists.txt
│ │ ├── MainApplicationModuleProvider.cpp
│ │ ├── MainApplicationModuleProvider.h
│ │ ├── MainApplicationTurboModuleManagerDelegate.cpp
│ │ ├── MainApplicationTurboModuleManagerDelegate.h
│ │ ├── MainComponentsRegistry.cpp
│ │ ├── MainComponentsRegistry.h
│ │ └── OnLoad.cpp
│ │ └── res
│ │ ├── drawable
│ │ └── rn_edit_text_material.xml
│ │ ├── ic_launcher-web.png
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-ldpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── playstore-icon.png
│ │ └── values
│ │ ├── ic_launcher_background.xml
│ │ ├── strings.xml
│ │ └── styles.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── link-assets-manifest.json
└── settings.gradle
├── app.json
├── babel.config.js
├── index.js
├── ios
├── .xcode.env
├── Fronend.xcodeproj
│ ├── project.pbxproj
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Fronend.xcscheme
├── Fronend
│ ├── AppDelegate.h
│ ├── AppDelegate.mm
│ ├── Images.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ ├── Icon-App-83.5x83.5@2x.png
│ │ │ └── ItunesArtwork@2x.png
│ │ └── Contents.json
│ ├── Info.plist
│ ├── LaunchScreen.storyboard
│ └── main.m
├── FronendTests
│ ├── FronendTests.m
│ └── Info.plist
├── Podfile
└── link-assets-manifest.json
├── metro.config.js
├── package-lock.json
├── package.json
├── react-native.config.js
├── src
├── @type
│ └── declarations.d.ts
├── MainStack.tsx
├── Navigation
│ ├── CustomDrawer.tsx
│ └── ListNavigation.tsx
├── app
│ ├── Reducers
│ │ └── User
│ │ │ ├── screensSlice.ts
│ │ │ └── userSlice.ts
│ ├── api
│ │ ├── baseApi.ts
│ │ ├── listApi.ts
│ │ ├── messageApi.ts
│ │ ├── searchApi.ts
│ │ ├── taskApi.ts
│ │ └── userApi.ts
│ ├── hooks.ts
│ └── store.ts
├── assets
│ ├── 3d
│ │ ├── Scene.tsx
│ │ ├── cube_outline.obj
│ │ ├── scene-transformed.glb
│ │ ├── scene.bin
│ │ └── scene.gltf
│ ├── constants.ts
│ ├── fonts
│ │ ├── Montserrat-Light.ttf
│ │ ├── Montserrat-Medium.ttf
│ │ ├── Montserrat-MediumItalic.ttf
│ │ ├── Montserrat-Regular.ttf
│ │ ├── Montserrat-Thin.ttf
│ │ ├── Report-Regular.ttf
│ │ └── SansSerifFLF.otf
│ ├── privacy
│ │ ├── privacy.pdf
│ │ └── term_of_use.pdf
│ └── svg
│ │ ├── ArrowDown.svg
│ │ ├── BoxIcon.svg
│ │ ├── BoxIconGreen.svg
│ │ ├── Continue.svg
│ │ ├── Done.svg
│ │ ├── DoneGreen.svg
│ │ ├── Google.svg
│ │ ├── GreenSelect.svg
│ │ ├── HamburgerBtn.svg
│ │ ├── HamburgerFixed.svg
│ │ ├── Hi.svg
│ │ ├── IAmNotStupid.svg
│ │ ├── IAmNotStupidTxt.svg
│ │ ├── I_AM_NOT_Stupid_Green.svg
│ │ ├── Logo.svg
│ │ ├── MenuIcon.svg
│ │ ├── MenuIconGreen.svg
│ │ ├── NotePlus.svg
│ │ ├── NumCheckBox.svg
│ │ ├── PizzaWidget.svg
│ │ ├── PlayHere.svg
│ │ ├── Search.svg
│ │ ├── SearchBtn.svg
│ │ ├── SearchGreen.svg
│ │ ├── Select.svg
│ │ ├── SelectWidgetTitle.svg
│ │ ├── SendBtn.svg
│ │ ├── StartButton.svg
│ │ ├── StupidSubTitle.svg
│ │ ├── TimeTips.svg
│ │ ├── ToggleWidget.svg
│ │ ├── Trash.svg
│ │ ├── TrashBlack.svg
│ │ ├── TrashGreen.svg
│ │ ├── TrashWhite.svg
│ │ ├── XBtn.svg
│ │ ├── XBtnFixed.svg
│ │ ├── index.ts
│ │ ├── plusIconOutlined.svg
│ │ └── vIcon.svg
├── components
│ ├── BallonTxt.tsx
│ ├── BottomSheetDeleteModal.tsx
│ ├── CalendarModal.tsx
│ ├── CheckBox.tsx
│ ├── CircleCheckBox.tsx
│ ├── DateList.tsx
│ ├── DatePickerModal.tsx
│ ├── DatesFlatList.tsx
│ ├── DisplayTask.tsx
│ ├── FloatHERE.tsx
│ ├── FrequencyPickerModal.tsx
│ ├── Line.tsx
│ ├── NewTask.tsx
│ ├── Notes.tsx
│ ├── PlusIcon.tsx
│ ├── Privacy.tsx
│ ├── RenderDateItem.tsx
│ ├── RenderListCategoryHome.tsx
│ ├── SetTimeContent.tsx
│ ├── TermOfUse.tsx
│ ├── TextInput.tsx
│ ├── TypeWriter.tsx
│ ├── WeeklyCalender.tsx
│ ├── boardingBox
│ │ ├── BoardingBoxWrapper.tsx
│ │ ├── LastMessage.tsx
│ │ ├── NextTask.tsx
│ │ ├── NotStupid.tsx
│ │ ├── PizzaBox.tsx
│ │ ├── TimeManage.tsx
│ │ └── ToggleBtn.tsx
│ ├── playGround
│ │ ├── AaTxt.tsx
│ │ ├── Cube.tsx
│ │ ├── Pizza.tsx
│ │ ├── SliderPlay.tsx
│ │ ├── TenCircles.tsx
│ │ └── ToggleButton.tsx
│ └── search
│ │ ├── RenderSearchElement.tsx
│ │ ├── SearchElement.tsx
│ │ └── types.ts
├── hooks
│ └── notification
│ │ ├── types.ts
│ │ ├── useFcmTokenRefresh.tsx
│ │ ├── useNotification.tsx
│ │ └── utils.ts
└── screens
│ ├── Auth.tsx
│ ├── AuthModal.tsx
│ ├── Home.tsx
│ ├── IamNotStupid.tsx
│ ├── Menu.tsx
│ ├── OnBoarding.tsx
│ ├── PlayGround.tsx
│ ├── Search.tsx
│ ├── SignInForm.tsx
│ ├── SignUpForm.tsx
│ ├── TimeTips.tsx
│ ├── Welcome.tsx
│ ├── list
│ ├── CreateOrEditList.tsx
│ ├── ListAndNotes.tsx
│ ├── ListItem.tsx
│ ├── MyLists.tsx
│ ├── MyListsWrapper.tsx
│ ├── NewListCategory.tsx
│ └── NewListTitle.tsx
│ ├── message
│ ├── Message.tsx
│ ├── Messages.tsx
│ ├── RenderMessageItem.tsx
│ └── types.ts
│ ├── selectWidgets
│ ├── SelectWidgetsTitle.tsx
│ ├── WidgetBox.tsx
│ ├── Widgets.tsx
│ └── types.ts
│ └── task
│ ├── AddOrEditTask.tsx
│ ├── AllMyTasks.tsx
│ ├── RenderTask.tsx
│ └── Task.tsx
├── tsconfig.json
└── yarn.lock
/.buckconfig:
--------------------------------------------------------------------------------
1 |
2 | [android]
3 | target = Google Inc.:Google APIs:23
4 |
5 | [maven_repositories]
6 | central = https://repo1.maven.org/maven2
7 |
--------------------------------------------------------------------------------
/.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-community',
4 | parser: '@typescript-eslint/parser',
5 | plugins: ['@typescript-eslint'],
6 | overrides: [
7 | {
8 | files: ['*.ts', '*.tsx'],
9 | rules: {
10 | '@typescript-eslint/no-shadow': ['error'],
11 | 'no-shadow': 'off',
12 | 'no-undef': 'off',
13 | },
14 | },
15 | ],
16 | };
17 |
--------------------------------------------------------------------------------
/.expo/README.md:
--------------------------------------------------------------------------------
1 | > Why do I have a folder named ".expo" in my project?
2 | The ".expo" folder is created when an Expo project is started using "expo start" command.
3 | > What do the files contain?
4 | - "devices.json": contains information about devices that have recently opened this project. This is used to populate the "Development sessions" list in your development builds.
5 | - "settings.json": contains the server configuration that is used to serve the application manifest.
6 | > Should I commit the ".expo" folder?
7 | No, you should not share the ".expo" folder. It does not contain any information that is relevant for other developers working on the project, it is specific to your machine.
8 | Upon project creation, the ".expo" folder is already added to your ".gitignore" file.
9 |
--------------------------------------------------------------------------------
/.expo/devices.json:
--------------------------------------------------------------------------------
1 | {
2 | "devices": []
3 | }
4 |
--------------------------------------------------------------------------------
/.expo/packager-info.json:
--------------------------------------------------------------------------------
1 | {
2 | "devToolsPort": 19002
3 | }
4 |
--------------------------------------------------------------------------------
/.expo/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "hostType": "lan",
3 | "lanType": "ip",
4 | "dev": true,
5 | "minify": false,
6 | "urlRandomness": null,
7 | "https": false,
8 | "scheme": null,
9 | "devClient": false
10 | }
11 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
4 |
5 | .env
6 | # Xcode
7 | #
8 | build/
9 | *.pbxuser
10 | !default.pbxuser
11 | *.mode1v3
12 | !default.mode1v3
13 | *.mode2v3
14 | !default.mode2v3
15 | *.perspectivev3
16 | !default.perspectivev3
17 | xcuserdata
18 | *.xccheckout
19 | *.moved-aside
20 | DerivedData
21 | *.hmap
22 | *.ipa
23 | *.xcuserstate
24 | ios/.xcode.env.local
25 |
26 | # Android/IntelliJ
27 | #
28 | build/
29 | .idea
30 | .gradle
31 | local.properties
32 | *.iml
33 | *.hprof
34 | .cxx/
35 |
36 | # node.js
37 | #
38 | node_modules/
39 | npm-debug.log
40 | yarn-error.log
41 |
42 | # BUCK
43 | buck-out/
44 | \.buckd/
45 | *.keystore
46 | !debug.keystore
47 |
48 | # fastlane
49 | #
50 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
51 | # screenshots whenever they are needed.
52 | # For more information about the recommended setup visit:
53 | # https://docs.fastlane.tools/best-practices/source-control/
54 |
55 | **/fastlane/report.xml
56 | **/fastlane/Preview.html
57 | **/fastlane/screenshots
58 | **/fastlane/test_output
59 |
60 | # Bundle artifact
61 | *.jsbundle
62 |
63 | # Ruby / CocoaPods
64 | /ios/Pods/
65 | /vendor/bundle/
66 |
67 | *.keystore
68 | *.gradle.properties
--------------------------------------------------------------------------------
/.node-version:
--------------------------------------------------------------------------------
1 | 16
2 |
--------------------------------------------------------------------------------
/.prettierrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | arrowParens: 'avoid',
3 | bracketSameLine: true,
4 | bracketSpacing: false,
5 | singleQuote: true,
6 | trailingComma: 'all',
7 | };
8 |
--------------------------------------------------------------------------------
/.ruby-version:
--------------------------------------------------------------------------------
1 | 2.7.5
2 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "cSpell.words": ["gorhom", "persistor", "reduxjs", "signup"]
3 | }
4 |
--------------------------------------------------------------------------------
/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/App.tsx:
--------------------------------------------------------------------------------
1 | /**
2 | * Sample React Native App
3 | * https://github.com/facebook/react-native
4 | *
5 | * Generated with the TypeScript template
6 | * https://github.com/react-native-community/react-native-template-typescript
7 | *
8 | * @format
9 | */
10 |
11 | // import {NavigationContainer} from '@react-navigation/native';
12 | import {GestureHandlerRootView} from 'react-native-gesture-handler';
13 | import React from 'react';
14 | import {LogBox, StyleSheet, Text} from 'react-native';
15 |
16 | // import {createNativeStackNavigator} from '@react-navigation/native-stack';
17 | import MainStack from './src/MainStack';
18 | import {Provider} from 'react-redux';
19 | import {persistor, store} from './src/app/store';
20 | import {PersistGate} from 'redux-persist/integration/react';
21 | import {BottomSheetModalProvider} from '@gorhom/bottom-sheet';
22 | LogBox.ignoreLogs([
23 | '[notifee] no background event handler has been set. Set a handler via the "onBackgroundEvent" method.',
24 | ]);
25 | const App = () => {
26 | return (
27 | <>
28 |
29 | Loading...}>
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | >
38 | );
39 | };
40 |
41 | const styles = StyleSheet.create({
42 | container: {
43 | flex: 1,
44 | },
45 | });
46 |
47 | export default App;
48 |
--------------------------------------------------------------------------------
/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.7.5'
5 |
6 | gem 'cocoapods', '~> 1.11', '>= 1.11.2'
7 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | Task Management App for ADHD
3 |
4 |
5 |
6 | Stay organized and on top of your daily tasks
7 |
8 |
9 | ## Preview
10 |
17 |
18 |
19 |
20 |
21 |
Home Page, Playground, and Customize Widget
22 |
23 |
24 | - The home page is where all your tasks and lists are organized. With the ability to add and edit tasks or lists, it's your one-stop hub for managing your daily activities.
25 |
26 | - The Playground screen offers a focus mode for individuals with ADHD. Here, you can engage with interactive elements like a 3D cube, a slider, and a toggle button, providing a playful way to enhance focus and reduce hyperactivity.
27 |
28 | - Customize your widget screen allows you to personalize the home screen widget according to your preferences.
29 |
30 |
31 |
32 |
Message to Myself
33 |
34 |
35 | - This screen serves as a "Message to Myself" feature, where you can have a chat-like interface to communicate with yourself. It provides a space for self-reflection, reminders, and notes.
36 |
37 |
38 |
39 |
40 |
41 | ## Features
42 |
43 | - **Task Scheduling:** Easily create and schedule tasks, ensuring you stay organized and on track.
44 | - **Category Management:** Organize your lists into different categories for better management and prioritization.
45 | - **Playground Feature:** Enjoy interactive elements like vibration, rotating cubes, and a toggle button to help simulate focus and reduce hyperactivity.
46 | - **List Creation and Organization:** Create and organize lists based on your needs, whether it's work tasks, personal errands, or daily routines.
47 | - **Push Notifications:** Set reminders and receive push notifications to ensure you never miss an important task.
48 | - **Intuitive Design:** The app's user-friendly interface and intuitive design make it easy to navigate and use, specifically tailored for individuals with ADHD.
49 | - **Playful Animations:** Enjoy playful animations that not only enhance the user experience but also make task management more enjoyable.
50 |
51 | ## Installation
52 |
53 | To get started with HERE, follow these steps:
54 | 1. Download the app from the [Google Play Store](https://play.google.com/store/apps/details?id=com.fronend).
55 | 2. Install the app on your mobile device.
56 | 3. Launch the app and create your account.
57 | 4. Explore the features and start organizing your tasks with ease.
58 |
59 | ## Feedback and Support
60 |
61 | We value your feedback and are continuously working to improve the app. If you have any suggestions, encounter any issues, or need support, please reach out to us at [support@example.com](mailto
62 |
--------------------------------------------------------------------------------
/__tests__/App-test.tsx:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import 'react-native';
6 | import React from 'react';
7 | import App from '../App';
8 |
9 | // Note: test renderer must be required after react-native.
10 | import renderer from 'react-test-renderer';
11 |
12 | it('renders correctly', () => {
13 | renderer.create( );
14 | });
15 |
--------------------------------------------------------------------------------
/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.fronend",
39 | )
40 |
41 | android_resource(
42 | name = "res",
43 | package = "com.fronend",
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/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 |
--------------------------------------------------------------------------------
/android/app/debug.keystore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/android/app/debug.keystore
--------------------------------------------------------------------------------
/android/app/google-services.json:
--------------------------------------------------------------------------------
1 | {
2 | "project_info": {
3 | "project_number": "372513103675",
4 | "project_id": "here-71213",
5 | "storage_bucket": "here-71213.appspot.com"
6 | },
7 | "client": [
8 | {
9 | "client_info": {
10 | "mobilesdk_app_id": "1:372513103675:android:71a1854221a47d59c4611e",
11 | "android_client_info": {
12 | "package_name": "com.fronend"
13 | }
14 | },
15 | "oauth_client": [
16 | {
17 | "client_id": "372513103675-3t7mq4uuqipqtg2akdd3eau7mqpg39p0.apps.googleusercontent.com",
18 | "client_type": 1,
19 | "android_info": {
20 | "package_name": "com.fronend",
21 | "certificate_hash": "01bab3c12ba488e754bf08acd8daea7b3a591370"
22 | }
23 | },
24 | {
25 | "client_id": "372513103675-jkglti6i2t966blckj133d8jmf2j4pts.apps.googleusercontent.com",
26 | "client_type": 1,
27 | "android_info": {
28 | "package_name": "com.fronend",
29 | "certificate_hash": "5e8f16062ea3cd2c4a0d547876baa6f38cabf625"
30 | }
31 | },
32 | {
33 | "client_id": "372513103675-ufj8hb6i725qb6qqeorabhpqu2jcrf3u.apps.googleusercontent.com",
34 | "client_type": 3
35 | }
36 | ],
37 | "api_key": [
38 | {
39 | "current_key": "AIzaSyBUbO9ozr4GWVVmtcXIWuOu57HNdgewKQs"
40 | }
41 | ],
42 | "services": {
43 | "appinvite_service": {
44 | "other_platform_oauth_client": [
45 | {
46 | "client_id": "372513103675-ufj8hb6i725qb6qqeorabhpqu2jcrf3u.apps.googleusercontent.com",
47 | "client_type": 3
48 | }
49 | ]
50 | }
51 | }
52 | }
53 | ],
54 | "configuration_version": "1"
55 | }
56 |
--------------------------------------------------------------------------------
/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/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/android/app/src/debug/java/com/fronend/ReactNativeFlipper.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the LICENSE file in the root
5 | * directory of this source tree.
6 | */
7 | package com.fronend;
8 |
9 | import android.content.Context;
10 | import com.facebook.flipper.android.AndroidFlipperClient;
11 | import com.facebook.flipper.android.utils.FlipperUtils;
12 | import com.facebook.flipper.core.FlipperClient;
13 | import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
14 | import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
15 | import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
16 | import com.facebook.flipper.plugins.inspector.DescriptorMapping;
17 | import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
18 | import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
19 | import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
20 | import com.facebook.flipper.plugins.react.ReactFlipperPlugin;
21 | import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
22 | import com.facebook.react.ReactInstanceEventListener;
23 | import com.facebook.react.ReactInstanceManager;
24 | import com.facebook.react.bridge.ReactContext;
25 | import com.facebook.react.modules.network.NetworkingModule;
26 | import okhttp3.OkHttpClient;
27 | import tech.bam.rnperformance.flipper.RNPerfMonitorPlugin;
28 |
29 | public class ReactNativeFlipper {
30 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
31 | if (FlipperUtils.shouldEnableFlipper(context)) {
32 | final FlipperClient client = AndroidFlipperClient.getInstance(context);
33 | client.addPlugin(new RNPerfMonitorPlugin(reactInstanceManager));
34 |
35 | client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
36 | client.addPlugin(new ReactFlipperPlugin());
37 | client.addPlugin(new DatabasesFlipperPlugin(context));
38 | client.addPlugin(new SharedPreferencesFlipperPlugin(context));
39 | client.addPlugin(CrashReporterPlugin.getInstance());
40 |
41 | NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
42 | NetworkingModule.setCustomClientBuilder(
43 | new NetworkingModule.CustomClientBuilder() {
44 | @Override
45 | public void apply(OkHttpClient.Builder builder) {
46 | builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
47 | }
48 | });
49 | client.addPlugin(networkFlipperPlugin);
50 | client.start();
51 |
52 | // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
53 | // Hence we run if after all native modules have been initialized
54 | ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
55 | if (reactContext == null) {
56 | reactInstanceManager.addReactInstanceEventListener(
57 | new ReactInstanceEventListener() {
58 | @Override
59 | public void onReactContextInitialized(ReactContext reactContext) {
60 | reactInstanceManager.removeReactInstanceEventListener(this);
61 | reactContext.runOnNativeModulesQueueThread(
62 | new Runnable() {
63 | @Override
64 | public void run() {
65 | client.addPlugin(new FrescoFlipperPlugin());
66 | }
67 | });
68 | }
69 | });
70 | } else {
71 | client.addPlugin(new FrescoFlipperPlugin());
72 | }
73 | }
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
13 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Montserrat-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/android/app/src/main/assets/fonts/Montserrat-Light.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Montserrat-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/android/app/src/main/assets/fonts/Montserrat-Medium.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Montserrat-MediumItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/android/app/src/main/assets/fonts/Montserrat-MediumItalic.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Montserrat-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/android/app/src/main/assets/fonts/Montserrat-Regular.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Montserrat-Thin.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/android/app/src/main/assets/fonts/Montserrat-Thin.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Report-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/android/app/src/main/assets/fonts/Report-Regular.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/SansSerifFLF.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/android/app/src/main/assets/fonts/SansSerifFLF.otf
--------------------------------------------------------------------------------
/android/app/src/main/assets/privacy.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/android/app/src/main/assets/privacy.pdf
--------------------------------------------------------------------------------
/android/app/src/main/assets/term_of_use.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/android/app/src/main/assets/term_of_use.pdf
--------------------------------------------------------------------------------
/android/app/src/main/java/com/fronend/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.fronend;
2 | import expo.modules.ReactActivityDelegateWrapper;
3 |
4 | import com.facebook.react.ReactActivity;
5 | import com.facebook.react.ReactActivityDelegate;
6 | import com.facebook.react.ReactRootView;
7 | import android.os.Bundle;
8 |
9 | public class MainActivity extends ReactActivity {
10 | @Override
11 | protected void onCreate(Bundle savedInstanceState) {
12 | super.onCreate(null);
13 | }
14 | /**
15 | * Returns the name of the main component registered from JavaScript. This is used to schedule
16 | * rendering of the component.
17 | */
18 | @Override
19 | protected String getMainComponentName() {
20 | return "Fronend";
21 | }
22 |
23 | /**
24 | * Returns the instance of the {@link ReactActivityDelegate}. There the RootView is created and
25 | * you can specify the renderer you wish to use - the new renderer (Fabric) or the old renderer
26 | * (Paper).
27 | */
28 | @Override
29 | protected ReactActivityDelegate createReactActivityDelegate() {
30 | return new ReactActivityDelegateWrapper(this, BuildConfig.IS_NEW_ARCHITECTURE_ENABLED, new MainActivityDelegate(this, getMainComponentName()));
31 | }
32 |
33 | public static class MainActivityDelegate extends ReactActivityDelegate {
34 | public MainActivityDelegate(ReactActivity activity, String mainComponentName) {
35 | super(activity, mainComponentName);
36 | }
37 |
38 | @Override
39 | protected ReactRootView createRootView() {
40 | ReactRootView reactRootView = new ReactRootView(getContext());
41 | // If you opted-in for the New Architecture, we enable the Fabric Renderer.
42 | reactRootView.setIsFabric(BuildConfig.IS_NEW_ARCHITECTURE_ENABLED);
43 | return reactRootView;
44 | }
45 |
46 | @Override
47 | protected boolean isConcurrentRootEnabled() {
48 | // If you opted-in for the New Architecture, we enable Concurrent Root (i.e. React 18).
49 | // More on this on https://reactjs.org/blog/2022/03/29/react-v18.html
50 | return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/fronend/newarchitecture/components/MainComponentsRegistry.java:
--------------------------------------------------------------------------------
1 | package com.fronend.newarchitecture.components;
2 |
3 | import com.facebook.jni.HybridData;
4 | import com.facebook.proguard.annotations.DoNotStrip;
5 | import com.facebook.react.fabric.ComponentFactory;
6 | import com.facebook.soloader.SoLoader;
7 |
8 | /**
9 | * Class responsible to load the custom Fabric Components. This class has native methods and needs a
10 | * corresponding C++ implementation/header file to work correctly (already placed inside the jni/
11 | * folder for you).
12 | *
13 | *
Please note that this class is used ONLY if you opt-in for the New Architecture (see the
14 | * `newArchEnabled` property). Is ignored otherwise.
15 | */
16 | @DoNotStrip
17 | public class MainComponentsRegistry {
18 | static {
19 | SoLoader.loadLibrary("fabricjni");
20 | }
21 |
22 | @DoNotStrip private final HybridData mHybridData;
23 |
24 | @DoNotStrip
25 | private native HybridData initHybrid(ComponentFactory componentFactory);
26 |
27 | @DoNotStrip
28 | private MainComponentsRegistry(ComponentFactory componentFactory) {
29 | mHybridData = initHybrid(componentFactory);
30 | }
31 |
32 | @DoNotStrip
33 | public static MainComponentsRegistry register(ComponentFactory componentFactory) {
34 | return new MainComponentsRegistry(componentFactory);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/fronend/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java:
--------------------------------------------------------------------------------
1 | package com.fronend.newarchitecture.modules;
2 |
3 | import com.facebook.jni.HybridData;
4 | import com.facebook.react.ReactPackage;
5 | import com.facebook.react.ReactPackageTurboModuleManagerDelegate;
6 | import com.facebook.react.bridge.ReactApplicationContext;
7 | import com.facebook.soloader.SoLoader;
8 | import java.util.List;
9 |
10 | /**
11 | * Class responsible to load the TurboModules. This class has native methods and needs a
12 | * corresponding C++ implementation/header file to work correctly (already placed inside the jni/
13 | * folder for you).
14 | *
15 | *
Please note that this class is used ONLY if you opt-in for the New Architecture (see the
16 | * `newArchEnabled` property). Is ignored otherwise.
17 | */
18 | public class MainApplicationTurboModuleManagerDelegate
19 | extends ReactPackageTurboModuleManagerDelegate {
20 |
21 | private static volatile boolean sIsSoLibraryLoaded;
22 |
23 | protected MainApplicationTurboModuleManagerDelegate(
24 | ReactApplicationContext reactApplicationContext, List packages) {
25 | super(reactApplicationContext, packages);
26 | }
27 |
28 | protected native HybridData initHybrid();
29 |
30 | native boolean canCreateTurboModule(String moduleName);
31 |
32 | public static class Builder extends ReactPackageTurboModuleManagerDelegate.Builder {
33 | protected MainApplicationTurboModuleManagerDelegate build(
34 | ReactApplicationContext context, List packages) {
35 | return new MainApplicationTurboModuleManagerDelegate(context, packages);
36 | }
37 | }
38 |
39 | @Override
40 | protected synchronized void maybeLoadOtherSoLibraries() {
41 | if (!sIsSoLibraryLoaded) {
42 | // If you change the name of your application .so file in the Android.mk file,
43 | // make sure you update the name here as well.
44 | SoLoader.loadLibrary("fronend_appmodules");
45 | sIsSoLibraryLoaded = true;
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/android/app/src/main/jni/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.13)
2 |
3 | # Define the library name here.
4 | project(fronend_appmodules)
5 |
6 | # This file includes all the necessary to let you build your application with the New Architecture.
7 | include(${REACT_ANDROID_DIR}/cmake-utils/ReactNative-application.cmake)
8 |
--------------------------------------------------------------------------------
/android/app/src/main/jni/MainApplicationModuleProvider.cpp:
--------------------------------------------------------------------------------
1 | #include "MainApplicationModuleProvider.h"
2 |
3 | #include
4 | #include
5 |
6 | namespace facebook {
7 | namespace react {
8 |
9 | std::shared_ptr MainApplicationModuleProvider(
10 | const std::string &moduleName,
11 | const JavaTurboModule::InitParams ¶ms) {
12 | // Here you can provide your own module provider for TurboModules coming from
13 | // either your application or from external libraries. The approach to follow
14 | // is similar to the following (for a library called `samplelibrary`:
15 | //
16 | // auto module = samplelibrary_ModuleProvider(moduleName, params);
17 | // if (module != nullptr) {
18 | // return module;
19 | // }
20 | // return rncore_ModuleProvider(moduleName, params);
21 |
22 | // Module providers autolinked by RN CLI
23 | auto rncli_module = rncli_ModuleProvider(moduleName, params);
24 | if (rncli_module != nullptr) {
25 | return rncli_module;
26 | }
27 |
28 | return rncore_ModuleProvider(moduleName, params);
29 | }
30 |
31 | } // namespace react
32 | } // namespace facebook
33 |
--------------------------------------------------------------------------------
/android/app/src/main/jni/MainApplicationModuleProvider.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 |
6 | #include
7 |
8 | namespace facebook {
9 | namespace react {
10 |
11 | std::shared_ptr MainApplicationModuleProvider(
12 | const std::string &moduleName,
13 | const JavaTurboModule::InitParams ¶ms);
14 |
15 | } // namespace react
16 | } // namespace facebook
17 |
--------------------------------------------------------------------------------
/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp:
--------------------------------------------------------------------------------
1 | #include "MainApplicationTurboModuleManagerDelegate.h"
2 | #include "MainApplicationModuleProvider.h"
3 |
4 | namespace facebook {
5 | namespace react {
6 |
7 | jni::local_ref
8 | MainApplicationTurboModuleManagerDelegate::initHybrid(
9 | jni::alias_ref) {
10 | return makeCxxInstance();
11 | }
12 |
13 | void MainApplicationTurboModuleManagerDelegate::registerNatives() {
14 | registerHybrid({
15 | makeNativeMethod(
16 | "initHybrid", MainApplicationTurboModuleManagerDelegate::initHybrid),
17 | makeNativeMethod(
18 | "canCreateTurboModule",
19 | MainApplicationTurboModuleManagerDelegate::canCreateTurboModule),
20 | });
21 | }
22 |
23 | std::shared_ptr
24 | MainApplicationTurboModuleManagerDelegate::getTurboModule(
25 | const std::string &name,
26 | const std::shared_ptr &jsInvoker) {
27 | // Not implemented yet: provide pure-C++ NativeModules here.
28 | return nullptr;
29 | }
30 |
31 | std::shared_ptr
32 | MainApplicationTurboModuleManagerDelegate::getTurboModule(
33 | const std::string &name,
34 | const JavaTurboModule::InitParams ¶ms) {
35 | return MainApplicationModuleProvider(name, params);
36 | }
37 |
38 | bool MainApplicationTurboModuleManagerDelegate::canCreateTurboModule(
39 | const std::string &name) {
40 | return getTurboModule(name, nullptr) != nullptr ||
41 | getTurboModule(name, {.moduleName = name}) != nullptr;
42 | }
43 |
44 | } // namespace react
45 | } // namespace facebook
46 |
--------------------------------------------------------------------------------
/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | #include
5 | #include
6 |
7 | namespace facebook {
8 | namespace react {
9 |
10 | class MainApplicationTurboModuleManagerDelegate
11 | : public jni::HybridClass<
12 | MainApplicationTurboModuleManagerDelegate,
13 | TurboModuleManagerDelegate> {
14 | public:
15 | // Adapt it to the package you used for your Java class.
16 | static constexpr auto kJavaDescriptor =
17 | "Lcom/fronend/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate;";
18 |
19 | static jni::local_ref initHybrid(jni::alias_ref);
20 |
21 | static void registerNatives();
22 |
23 | std::shared_ptr getTurboModule(
24 | const std::string &name,
25 | const std::shared_ptr &jsInvoker) override;
26 | std::shared_ptr getTurboModule(
27 | const std::string &name,
28 | const JavaTurboModule::InitParams ¶ms) override;
29 |
30 | /**
31 | * Test-only method. Allows user to verify whether a TurboModule can be
32 | * created by instances of this class.
33 | */
34 | bool canCreateTurboModule(const std::string &name);
35 | };
36 |
37 | } // namespace react
38 | } // namespace facebook
39 |
--------------------------------------------------------------------------------
/android/app/src/main/jni/MainComponentsRegistry.cpp:
--------------------------------------------------------------------------------
1 | #include "MainComponentsRegistry.h"
2 |
3 | #include
4 | #include
5 | #include
6 | #include
7 | #include
8 |
9 | namespace facebook {
10 | namespace react {
11 |
12 | MainComponentsRegistry::MainComponentsRegistry(ComponentFactory *delegate) {}
13 |
14 | std::shared_ptr
15 | MainComponentsRegistry::sharedProviderRegistry() {
16 | auto providerRegistry = CoreComponentsRegistry::sharedProviderRegistry();
17 |
18 | // Autolinked providers registered by RN CLI
19 | rncli_registerProviders(providerRegistry);
20 |
21 | // Custom Fabric Components go here. You can register custom
22 | // components coming from your App or from 3rd party libraries here.
23 | //
24 | // providerRegistry->add(concreteComponentDescriptorProvider<
25 | // AocViewerComponentDescriptor>());
26 | return providerRegistry;
27 | }
28 |
29 | jni::local_ref
30 | MainComponentsRegistry::initHybrid(
31 | jni::alias_ref,
32 | ComponentFactory *delegate) {
33 | auto instance = makeCxxInstance(delegate);
34 |
35 | auto buildRegistryFunction =
36 | [](EventDispatcher::Weak const &eventDispatcher,
37 | ContextContainer::Shared const &contextContainer)
38 | -> ComponentDescriptorRegistry::Shared {
39 | auto registry = MainComponentsRegistry::sharedProviderRegistry()
40 | ->createComponentDescriptorRegistry(
41 | {eventDispatcher, contextContainer});
42 |
43 | auto mutableRegistry =
44 | std::const_pointer_cast(registry);
45 |
46 | mutableRegistry->setFallbackComponentDescriptor(
47 | std::make_shared(
48 | ComponentDescriptorParameters{
49 | eventDispatcher, contextContainer, nullptr}));
50 |
51 | return registry;
52 | };
53 |
54 | delegate->buildRegistryFunction = buildRegistryFunction;
55 | return instance;
56 | }
57 |
58 | void MainComponentsRegistry::registerNatives() {
59 | registerHybrid({
60 | makeNativeMethod("initHybrid", MainComponentsRegistry::initHybrid),
61 | });
62 | }
63 |
64 | } // namespace react
65 | } // namespace facebook
66 |
--------------------------------------------------------------------------------
/android/app/src/main/jni/MainComponentsRegistry.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 | namespace facebook {
9 | namespace react {
10 |
11 | class MainComponentsRegistry
12 | : public facebook::jni::HybridClass {
13 | public:
14 | // Adapt it to the package you used for your Java class.
15 | constexpr static auto kJavaDescriptor =
16 | "Lcom/fronend/newarchitecture/components/MainComponentsRegistry;";
17 |
18 | static void registerNatives();
19 |
20 | MainComponentsRegistry(ComponentFactory *delegate);
21 |
22 | private:
23 | static std::shared_ptr
24 | sharedProviderRegistry();
25 |
26 | static jni::local_ref initHybrid(
27 | jni::alias_ref,
28 | ComponentFactory *delegate);
29 | };
30 |
31 | } // namespace react
32 | } // namespace facebook
33 |
--------------------------------------------------------------------------------
/android/app/src/main/jni/OnLoad.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include "MainApplicationTurboModuleManagerDelegate.h"
3 | #include "MainComponentsRegistry.h"
4 |
5 | JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *) {
6 | return facebook::jni::initialize(vm, [] {
7 | facebook::react::MainApplicationTurboModuleManagerDelegate::
8 | registerNatives();
9 | facebook::react::MainComponentsRegistry::registerNatives();
10 | });
11 | }
12 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/rn_edit_text_material.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
21 |
22 |
23 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/android/app/src/main/res/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/android/app/src/main/res/ic_launcher-web.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-ldpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/android/app/src/main/res/mipmap-ldpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/playstore-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/android/app/src/main/res/playstore-icon.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #242423
4 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | HERE
3 |
4 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | ext {
5 | buildToolsVersion = "31.0.0"
6 | minSdkVersion = 21
7 | compileSdkVersion = 33
8 | targetSdkVersion = 33
9 |
10 | if (System.properties['os.arch'] == "aarch64") {
11 | // For M1 Users we need to use the NDK 24 which added support for aarch64
12 | ndkVersion = "24.0.8215888"
13 | } else {
14 | // Otherwise we default to the side-by-side NDK version from AGP.
15 | ndkVersion = "21.4.7075529"
16 | }
17 | }
18 | repositories {
19 | google()
20 | mavenCentral()
21 | }
22 | dependencies {
23 | classpath("com.android.tools.build:gradle:7.2.1")
24 | classpath("com.facebook.react:react-native-gradle-plugin")
25 | classpath("de.undercouch:gradle-download-task:5.0.1")
26 | classpath 'com.google.gms:google-services:4.3.15'
27 | // NOTE: Do not place your application dependencies here; they belong
28 | // in the individual module build.gradle files
29 | }
30 | }
31 |
32 | allprojects {
33 | repositories {
34 | maven {
35 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
36 | url("$rootDir/../node_modules/react-native/android")
37 | }
38 | maven {
39 | // Android JSC is installed from npm
40 | url("$rootDir/../node_modules/jsc-android/dist")
41 | }
42 | mavenCentral {
43 | // We don't want to fetch react-native from Maven Central as there are
44 | // older versions over there.
45 | content {
46 | excludeGroup "com.facebook.react"
47 | }
48 | }
49 | google()
50 | maven { url 'https://www.jitpack.io' }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx512m -XX:MaxMetaspaceSize=256m
13 | org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
20 | # AndroidX package structure to make it clearer which packages are bundled with the
21 | # Android operating system, and which are packaged with your app's APK
22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
23 | android.useAndroidX=true
24 | # Automatically convert third-party libraries to use AndroidX
25 | android.enableJetifier=true
26 |
27 | # Version of flipper SDK to use with React Native
28 | FLIPPER_VERSION=0.125.0
29 |
30 | # Use this property to specify which architecture you want to build.
31 | # You can also override it from the CLI using
32 | # ./gradlew -PreactNativeArchitectures=x86_64
33 | reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
34 |
35 | # Use this property to enable support to the new architecture.
36 | # This will allow you to use TurboModules and the Fabric render in
37 | # your application. You should enable this flag either if you want
38 | # to write custom TurboModules/Fabric components OR use libraries that
39 | # are providing them.
40 | newArchEnabled=false
41 |
42 |
43 | MYAPP_UPLOAD_STORE_FILE=my-upload-key.keystore
44 | MYAPP_UPLOAD_KEY_ALIAS=my-key-alias
45 | MYAPP_UPLOAD_STORE_PASSWORD=hereapp11122211
46 | MYAPP_UPLOAD_KEY_PASSWORD=hereapp11122211
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34 |
35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37 |
38 | @rem Find java.exe
39 | if defined JAVA_HOME goto findJavaFromJavaHome
40 |
41 | set JAVA_EXE=java.exe
42 | %JAVA_EXE% -version >NUL 2>&1
43 | if "%ERRORLEVEL%" == "0" goto execute
44 |
45 | echo.
46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47 | echo.
48 | echo Please set the JAVA_HOME variable in your environment to match the
49 | echo location of your Java installation.
50 |
51 | goto fail
52 |
53 | :findJavaFromJavaHome
54 | set JAVA_HOME=%JAVA_HOME:"=%
55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56 |
57 | if exist "%JAVA_EXE%" goto execute
58 |
59 | echo.
60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61 | echo.
62 | echo Please set the JAVA_HOME variable in your environment to match the
63 | echo location of your Java installation.
64 |
65 | goto fail
66 |
67 | :execute
68 | @rem Setup the command line
69 |
70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71 |
72 |
73 | @rem Execute Gradle
74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75 |
76 | :end
77 | @rem End local scope for the variables with windows NT shell
78 | if "%ERRORLEVEL%"=="0" goto mainEnd
79 |
80 | :fail
81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82 | rem the _cmd.exe /c_ return code!
83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84 | exit /b 1
85 |
86 | :mainEnd
87 | if "%OS%"=="Windows_NT" endlocal
88 |
89 | :omega
90 |
--------------------------------------------------------------------------------
/android/link-assets-manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "migIndex": 1,
3 | "data": [
4 | {
5 | "path": "src/assets/fonts/Montserrat-Light.ttf",
6 | "sha1": "6f21894a80049259ef71fcba135218695b41b67a"
7 | },
8 | {
9 | "path": "src/assets/fonts/Montserrat-Medium.ttf",
10 | "sha1": "6b57d12e018c64352e202f8ef3bf7f431f76d935"
11 | },
12 | {
13 | "path": "src/assets/fonts/Montserrat-MediumItalic.ttf",
14 | "sha1": "8b2c464e42f07fc307fddb9c58d202ecff19be2a"
15 | },
16 | {
17 | "path": "src/assets/fonts/Montserrat-Regular.ttf",
18 | "sha1": "de57aa03e4821fdbe6c34ec2c895e8b5c914e837"
19 | },
20 | {
21 | "path": "src/assets/fonts/Montserrat-Thin.ttf",
22 | "sha1": "8c871991960f520a31635f95be6c346b659e2c8c"
23 | },
24 | {
25 | "path": "src/assets/fonts/Report-Regular.ttf",
26 | "sha1": "bf22b2e6036a9c4827de6abe8d019c5b500ee5d1"
27 | },
28 | {
29 | "path": "src/assets/fonts/SansSerifFLF.otf",
30 | "sha1": "4169bb34b552d3ac95580a940a5d4a11dd02dd2c"
31 | }
32 | ]
33 | }
34 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'Fronend'
2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
3 | include ':app'
4 | includeBuild('../node_modules/react-native-gradle-plugin')
5 |
6 | if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") {
7 | include(":ReactAndroid")
8 | project(":ReactAndroid").projectDir = file('../node_modules/react-native/ReactAndroid')
9 | include(":ReactAndroid:hermes-engine")
10 | project(":ReactAndroid:hermes-engine").projectDir = file('../node_modules/react-native/ReactAndroid/hermes-engine')
11 | }
12 |
13 | apply from: new File(["node", "--print", "require.resolve('expo/package.json')"].execute(null, rootDir).text.trim(), "../scripts/autolinking.gradle")
14 | useExpoModules()
--------------------------------------------------------------------------------
/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Fronend",
3 | "displayName": "HERE"
4 | }
5 |
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: ['module:metro-react-native-babel-preset'],
3 | plugins: [
4 | 'react-native-reanimated/plugin',
5 | [
6 | 'module:react-native-dotenv',
7 | {
8 | envName: 'APP_ENV',
9 | moduleName: '@env',
10 | path: '.env',
11 | },
12 | ],
13 | ],
14 | };
15 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 | import 'react-native-reanimated';
5 | import 'react-native-gesture-handler'; // https://reactnavigation.org/docs/drawer-navigator#installation
6 | import {AppRegistry} from 'react-native';
7 | import App from './App';
8 | import {name as appName} from './app.json';
9 | import notifee, {AndroidImportance} from '@notifee/react-native';
10 | import messaging from '@react-native-firebase/messaging';
11 | import {
12 | handleNotification,
13 | onDisplayNotification,
14 | } from './src/hooks/notification/utils';
15 |
16 | messaging().setBackgroundMessageHandler(async remoteMessage => {
17 | await notifee.createChannel({
18 | id: 'Here - default',
19 | name: 'Here - default',
20 | importance: AndroidImportance.HIGH,
21 | });
22 | await onDisplayNotification(remoteMessage);
23 | });
24 | notifee.onBackgroundEvent(handleNotification);
25 | AppRegistry.registerComponent(appName, () => App);
26 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/ios/Fronend.xcodeproj/xcshareddata/xcschemes/Fronend.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
53 |
55 |
61 |
62 |
63 |
64 |
70 |
72 |
78 |
79 |
80 |
81 |
83 |
84 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/ios/Fronend/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 | #import
4 |
5 | @interface AppDelegate : EXAppDelegateWrapper
6 |
7 | @property (nonatomic, strong) UIWindow *window;
8 |
9 | @end
10 |
--------------------------------------------------------------------------------
/ios/Fronend/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/ios/Fronend/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/ios/Fronend/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/ios/Fronend/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/ios/Fronend/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/ios/Fronend/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/ios/Fronend/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/ios/Fronend/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/ios/Fronend/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/ios/Fronend/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/ios/Fronend/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/ios/Fronend/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/ios/Fronend/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/ios/Fronend/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/ios/Fronend/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/ios/Fronend/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/ios/Fronend/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/ios/Fronend/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Fronend/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/ios/Fronend/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/ios/Fronend/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/ios/Fronend/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Fronend/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/ios/Fronend/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/ios/Fronend/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/ios/Fronend/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Fronend/Images.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/ios/Fronend/Images.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/ios/Fronend/Images.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/ios/Fronend/Images.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png
--------------------------------------------------------------------------------
/ios/Fronend/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/ios/Fronend/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | Here
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSRequiresIPhoneOS
26 |
27 | NSAppTransportSecurity
28 |
29 | NSExceptionDomains
30 |
31 | localhost
32 |
33 | NSExceptionAllowsInsecureHTTPLoads
34 |
35 |
36 |
37 |
38 | NSLocationWhenInUseUsageDescription
39 |
40 | UILaunchStoryboardName
41 | LaunchScreen
42 | UIRequiredDeviceCapabilities
43 |
44 | armv7
45 |
46 | UISupportedInterfaceOrientations
47 |
48 | UIInterfaceOrientationPortrait
49 | UIInterfaceOrientationLandscapeLeft
50 | UIInterfaceOrientationLandscapeRight
51 |
52 | UIViewControllerBasedStatusBarAppearance
53 |
54 | UIAppFonts
55 |
56 | Montserrat-Light.ttf
57 | Montserrat-MediumItalic.ttf
58 | Montserrat-Regular.ttf
59 | Montserrat-Thin.ttf
60 | Report-Regular.ttf
61 | SansSerifFLF.otf
62 | Montserrat-Medium.ttf
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/ios/Fronend/main.m:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char *argv[])
6 | {
7 | @autoreleasepool {
8 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/ios/FronendTests/FronendTests.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | #import
5 | #import
6 |
7 | #define TIMEOUT_SECONDS 600
8 | #define TEXT_TO_LOOK_FOR @"Welcome to React"
9 |
10 | @interface FronendTests : XCTestCase
11 |
12 | @end
13 |
14 | @implementation FronendTests
15 |
16 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test
17 | {
18 | if (test(view)) {
19 | return YES;
20 | }
21 | for (UIView *subview in [view subviews]) {
22 | if ([self findSubviewInView:subview matching:test]) {
23 | return YES;
24 | }
25 | }
26 | return NO;
27 | }
28 |
29 | - (void)testRendersWelcomeScreen
30 | {
31 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
32 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
33 | BOOL foundElement = NO;
34 |
35 | __block NSString *redboxError = nil;
36 | #ifdef DEBUG
37 | RCTSetLogFunction(
38 | ^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
39 | if (level >= RCTLogLevelError) {
40 | redboxError = message;
41 | }
42 | });
43 | #endif
44 |
45 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
46 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
47 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
48 |
49 | foundElement = [self findSubviewInView:vc.view
50 | matching:^BOOL(UIView *view) {
51 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
52 | return YES;
53 | }
54 | return NO;
55 | }];
56 | }
57 |
58 | #ifdef DEBUG
59 | RCTSetLogFunction(RCTDefaultLogFunction);
60 | #endif
61 |
62 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
63 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
64 | }
65 |
66 | @end
67 |
--------------------------------------------------------------------------------
/ios/FronendTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/ios/Podfile:
--------------------------------------------------------------------------------
1 | require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
2 | require_relative '../node_modules/react-native/scripts/react_native_pods'
3 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
4 |
5 | platform :ios, '13.0'
6 | install! 'cocoapods', :deterministic_uuids => false
7 |
8 | target 'Fronend' do
9 | use_expo_modules!
10 | post_integrate do |installer|
11 | begin
12 | expo_patch_react_imports!(installer)
13 | rescue => e
14 | Pod::UI.warn e
15 | end
16 | begin
17 | expo_patch_react_imports!(installer)
18 | rescue => e
19 | Pod::UI.warn e
20 | end
21 | end
22 | config = use_native_modules!
23 |
24 | # Flags change depending on the env values.
25 | flags = get_default_flags()
26 |
27 | use_react_native!(
28 | :path => config[:reactNativePath],
29 | # Hermes is now enabled by default. Disable by setting this flag to false.
30 | # Upcoming versions of React Native may rely on get_default_flags(), but
31 | # we make it explicit here to aid in the React Native upgrade process.
32 | :hermes_enabled => true,
33 | :fabric_enabled => flags[:fabric_enabled],
34 | # Enables Flipper.
35 | #
36 | # Note that if you have use_frameworks! enabled, Flipper will not work and
37 | # you should disable the next line.
38 | :flipper_configuration => FlipperConfiguration.enabled,
39 | # An absolute path to your application root.
40 | :app_path => "#{Pod::Config.instance.installation_root}/.."
41 | )
42 |
43 | target 'FronendTests' do
44 | inherit! :complete
45 | # Pods for testing
46 | end
47 |
48 | post_install do |installer|
49 | react_native_post_install(
50 | installer,
51 | # Set `mac_catalyst_enabled` to `true` in order to apply patches
52 | # necessary for Mac Catalyst builds
53 | :mac_catalyst_enabled => false
54 | )
55 | __apply_Xcode_12_5_M1_post_install_workaround(installer)
56 | end
57 | end
58 |
--------------------------------------------------------------------------------
/ios/link-assets-manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "migIndex": 1,
3 | "data": [
4 | {
5 | "path": "src/assets/fonts/Montserrat-Light.ttf",
6 | "sha1": "6f21894a80049259ef71fcba135218695b41b67a"
7 | },
8 | {
9 | "path": "src/assets/fonts/Montserrat-Medium.ttf",
10 | "sha1": "6b57d12e018c64352e202f8ef3bf7f431f76d935"
11 | },
12 | {
13 | "path": "src/assets/fonts/Montserrat-MediumItalic.ttf",
14 | "sha1": "8b2c464e42f07fc307fddb9c58d202ecff19be2a"
15 | },
16 | {
17 | "path": "src/assets/fonts/Montserrat-Regular.ttf",
18 | "sha1": "de57aa03e4821fdbe6c34ec2c895e8b5c914e837"
19 | },
20 | {
21 | "path": "src/assets/fonts/Montserrat-Thin.ttf",
22 | "sha1": "8c871991960f520a31635f95be6c346b659e2c8c"
23 | },
24 | {
25 | "path": "src/assets/fonts/Report-Regular.ttf",
26 | "sha1": "bf22b2e6036a9c4827de6abe8d019c5b500ee5d1"
27 | },
28 | {
29 | "path": "src/assets/fonts/SansSerifFLF.otf",
30 | "sha1": "4169bb34b552d3ac95580a940a5d4a11dd02dd2c"
31 | }
32 | ]
33 | }
34 |
--------------------------------------------------------------------------------
/metro.config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Metro configuration for React Native
3 | * https://github.com/facebook/react-native
4 | *
5 | * @format
6 | */
7 |
8 | const {getDefaultConfig} = require('metro-config');
9 |
10 | module.exports = (async () => {
11 | const {
12 | resolver: {sourceExts, assetExts},
13 | } = await getDefaultConfig();
14 | return {
15 | transformer: {
16 | getTransformOptions: async () => ({
17 | transform: {
18 | experimentalImportSupport: false,
19 | inlineRequires: true,
20 | },
21 | }),
22 | babelTransformerPath: require.resolve('react-native-svg-transformer'),
23 | },
24 | resolver: {
25 | assetExts: [
26 | ...assetExts.filter(ext => ext !== 'svg'),
27 | 'obj',
28 | 'gltf',
29 | 'glb',
30 | ],
31 | sourceExts: [...sourceExts, 'svg'],
32 | },
33 | };
34 | })();
35 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Fronend",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "android": "react-native run-android",
7 | "ios": "react-native run-ios",
8 | "start": "react-native start",
9 | "test": "jest",
10 | "lint": "eslint . --ext .js,.jsx,.ts,.tsx"
11 | },
12 | "dependencies": {
13 | "@gorhom/bottom-sheet": "4",
14 | "@notifee/react-native": "^7.7.1",
15 | "@react-native-async-storage/async-storage": "^1.17.11",
16 | "@react-native-cookies/cookies": "^6.2.1",
17 | "@react-native-firebase/app": "^17.5.0",
18 | "@react-native-firebase/auth": "^17.5.0",
19 | "@react-native-firebase/messaging": "^17.5.0",
20 | "@react-native-google-signin/google-signin": "^10.0.1",
21 | "@react-native-masked-view/masked-view": "^0.2.9",
22 | "@react-navigation/bottom-tabs": "^6.4.3",
23 | "@react-navigation/drawer": "^6.5.3",
24 | "@react-navigation/native": "^6.1.6",
25 | "@react-navigation/native-stack": "^6.9.4",
26 | "@react-three/drei": "^9.65.5",
27 | "@react-three/fiber": "^8.12.2",
28 | "@reduxjs/toolkit": "^1.9.5",
29 | "@rneui/base": "^4.0.0-rc.7",
30 | "@rneui/themed": "^4.0.0-rc.7",
31 | "@shopify/flash-list": "^1.4.2",
32 | "@types/react-redux": "^7.1.24",
33 | "expo": "^47.0.0",
34 | "expo-gl": "~12.0.1",
35 | "formik": "^2.2.9",
36 | "lottie-react-native": "^5.1.6",
37 | "moment": "^2.29.4",
38 | "react": "18.1.0",
39 | "react-native": "0.70.6",
40 | "react-native-animated-pagination-dots": "^0.1.73",
41 | "react-native-blob-util": "^0.18.3",
42 | "react-native-calendars": "^1.1295.0",
43 | "react-native-date-picker": "^4.2.9",
44 | "react-native-gesture-handler": "^2.8.0",
45 | "react-native-keyboard-aware-scroll-view": "^0.9.5",
46 | "react-native-linear-gradient": "^2.7.1",
47 | "react-native-modal": "^13.0.1",
48 | "react-native-pdf": "^6.6.2",
49 | "react-native-reanimated": "^3.1.0",
50 | "react-native-responsive-fontsize": "^0.5.1",
51 | "react-native-safe-area-context": "^4.5.2",
52 | "react-native-screens": "^3.20.0",
53 | "react-native-svg": "^13.6.0",
54 | "react-native-switch-toggle": "^2.2.1",
55 | "react-native-uuid": "^2.0.1",
56 | "react-native-vector-icons": "^9.2.0",
57 | "react-redux": "^8.0.5",
58 | "redux-persist": "^6.0.0",
59 | "three": "^0.145.0",
60 | "yup": "^0.32.11"
61 | },
62 | "devDependencies": {
63 | "@babel/core": "^7.12.9",
64 | "@babel/runtime": "^7.12.5",
65 | "@react-native-community/eslint-config": "^2.0.0",
66 | "@tsconfig/react-native": "^2.0.2",
67 | "@types/jest": "^26.0.23",
68 | "@types/react": "~18.0.24",
69 | "@types/react-native": "^0.70.6",
70 | "@types/react-native-vector-icons": "^6.4.12",
71 | "@types/react-test-renderer": "^18.0.0",
72 | "@types/redux-persist": "^4.3.1",
73 | "@types/three": "^0.150.2",
74 | "@typescript-eslint/eslint-plugin": "^5.37.0",
75 | "@typescript-eslint/parser": "^5.37.0",
76 | "babel-jest": "^26.6.3",
77 | "eslint": "^7.32.0",
78 | "jest": "^26.6.3",
79 | "metro-react-native-babel-preset": "0.72.3",
80 | "react-native-dotenv": "^3.4.8",
81 | "react-native-flipper-performance-plugin": "^0.4.0",
82 | "react-native-svg-transformer": "^1.0.0",
83 | "react-test-renderer": "18.1.0",
84 | "typescript": "^4.8.3"
85 | },
86 | "jest": {
87 | "preset": "react-native",
88 | "moduleFileExtensions": [
89 | "ts",
90 | "tsx",
91 | "js",
92 | "jsx",
93 | "json",
94 | "node"
95 | ]
96 | }
97 | }
98 |
--------------------------------------------------------------------------------
/react-native.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | project: {
3 | ios: {},
4 | android: {},
5 | },
6 | assets: ['./src/assets/fonts'],
7 | };
8 |
--------------------------------------------------------------------------------
/src/@type/declarations.d.ts:
--------------------------------------------------------------------------------
1 | declare module '*.svg' {
2 | import React from 'react';
3 | import {SvgProps} from 'react-native-svg';
4 | const content: React.FC;
5 | export default content;
6 | }
7 | declare module '@env' {
8 | export const GOOGLE_WEB_CLIENT_ID: string;
9 | }
10 |
--------------------------------------------------------------------------------
/src/Navigation/ListNavigation.tsx:
--------------------------------------------------------------------------------
1 | // CreateProfileNavigator.tsx
2 |
3 | import React from 'react';
4 | import {
5 | NativeStackNavigationOptions,
6 | createNativeStackNavigator,
7 | } from '@react-navigation/native-stack';
8 | import ListAndNotes from '../screens/list/ListAndNotes';
9 | import MyLists from '../screens/list/MyLists';
10 | import CreateOrEditList from '../screens/list/CreateOrEditList';
11 | import NewListCategory from '../screens/list/NewListCategory';
12 | import NewListTitle from '../screens/list/NewListTitle';
13 | import {
14 | DrawerNavigationOptions,
15 | createDrawerNavigator,
16 | } from '@react-navigation/drawer';
17 |
18 | const Stack = createNativeStackNavigator();
19 | // const Stack = createDrawerNavigator();
20 |
21 | const ListAndNotesNavigator = () => {
22 | const options: NativeStackNavigationOptions = {headerShown: false};
23 | // const options: DrawerNavigationOptions = {headerShown: false};
24 |
25 | return (
26 |
27 |
32 |
33 |
38 |
43 |
48 |
49 | );
50 | };
51 |
52 | export default ListAndNotesNavigator;
53 |
--------------------------------------------------------------------------------
/src/app/Reducers/User/screensSlice.ts:
--------------------------------------------------------------------------------
1 | import {createSlice} from '@reduxjs/toolkit';
2 | import type {PayloadAction} from '@reduxjs/toolkit';
3 | import type {RootState} from '../../store';
4 | import {CategoryListType} from '../../../assets/constants';
5 |
6 | export interface ScreensState {
7 | home?: boolean;
8 | lists?: boolean;
9 | tasks?: boolean;
10 | playGround?: boolean;
11 | chat?: boolean;
12 | timeTips?: boolean;
13 | stupid?: boolean;
14 | settings?: boolean;
15 | widgets?: boolean;
16 | privacy?: boolean;
17 | termOfUse?: boolean;
18 | }
19 | // Define the initial state using that type
20 | const initialState: ScreensState = {
21 | home: false,
22 | lists: false,
23 | tasks: false,
24 | playGround: false,
25 | chat: false,
26 | timeTips: false,
27 | stupid: false,
28 | settings: false,
29 | widgets: false,
30 | privacy: false,
31 | termOfUse: false,
32 | };
33 |
34 | export const screensSlice = createSlice({
35 | name: 'screens',
36 | initialState,
37 | reducers: {
38 | setFocus: (state, action: PayloadAction) => {
39 | state = {...initialState, ...action.payload};
40 | return state;
41 | },
42 | },
43 | });
44 |
45 | export const {setFocus} = screensSlice.actions;
46 |
47 | // Other code such as selectors can use the imported `RootState` type
48 | export const screenSelector = (state: RootState) => state.reducer.screens;
49 |
50 | export default screensSlice.reducer;
51 |
--------------------------------------------------------------------------------
/src/app/Reducers/User/userSlice.ts:
--------------------------------------------------------------------------------
1 | import {createSlice} from '@reduxjs/toolkit';
2 | import type {PayloadAction} from '@reduxjs/toolkit';
3 | import type {RootState} from '../../store';
4 | import {CategoryListType} from '../../../assets/constants';
5 |
6 | // Define a type for the slice state
7 | export interface UserState {
8 | _id?: string;
9 | name?: string;
10 | email?: string;
11 | password?: string;
12 | isSignIn?: boolean;
13 | img?: string;
14 | tasks?: TaskType[];
15 | categoriesList: CategoryListType[];
16 | token?: string;
17 | fcmToken?: string;
18 | isNewUser?: boolean;
19 | }
20 | export interface TaskType {
21 | _id?: string;
22 | name?: string;
23 | done?: boolean;
24 | details?: string;
25 | push?: boolean;
26 | targetDate?: string;
27 | isSetTime?: boolean;
28 | note?: string;
29 | }
30 |
31 | // Define the initial state using that type
32 | const initialState: UserState = {
33 | _id: '',
34 | name: 'New User',
35 | email: '',
36 | password: '',
37 | img: undefined,
38 | isSignIn: false,
39 | token: '',
40 | fcmToken: '',
41 | categoriesList: [],
42 | isNewUser: true,
43 | };
44 |
45 | export const userSlice = createSlice({
46 | name: 'user',
47 | initialState,
48 | reducers: {
49 | setUser: (state, action: PayloadAction) => {
50 | state = {...state, ...action.payload};
51 | return state;
52 | },
53 | login: (state, action: PayloadAction) => {
54 | state = {...state, ...action.payload, ...action.payload.user};
55 | return state;
56 | },
57 | logout: state => {
58 | state = {...initialState};
59 | return state;
60 | },
61 | setCategoriesList: (state, action: PayloadAction) => {
62 | state = {...state, categoriesList: [...action.payload]};
63 | return state;
64 | },
65 | setFcm: (state, action: PayloadAction) => {
66 | state = {...state, fcmToken: action.payload};
67 | return state;
68 | },
69 | setNewUser: (state, action: PayloadAction) => {
70 | state = {...state, isNewUser: action.payload};
71 | return state;
72 | },
73 | },
74 | });
75 |
76 | export const {setUser, login, logout, setCategoriesList, setFcm, setNewUser} =
77 | userSlice.actions;
78 |
79 | // Other code such as selectors can use the imported `RootState` type
80 | export const selectUser = (state: RootState) => state.reducer.user;
81 | export const selectUserToken = (state: RootState) => state.reducer.user.token;
82 | export const selectUserFcmToken = (state: RootState) =>
83 | state.reducer.user.fcmToken;
84 | export const selectIsSignIn = (state: RootState) => state.reducer.user.isSignIn;
85 | export const selectIsNewUser = (state: RootState) =>
86 | state.reducer.user.isNewUser;
87 | export const selectCategoriesList = (state: RootState) =>
88 | state.reducer.user.categoriesList;
89 |
90 | export default userSlice.reducer;
91 |
--------------------------------------------------------------------------------
/src/app/api/listApi.ts:
--------------------------------------------------------------------------------
1 | import {CategoryListType, ListType} from '../../assets/constants';
2 | import {apiSlice} from './baseApi';
3 |
4 | export const listsApi = apiSlice.injectEndpoints({
5 | endpoints: builder => ({
6 | getLists: builder.query({
7 | query: () => 'list/categories',
8 | providesTags: ['Lists'],
9 | transformResponse: (response: any, meta, arg) => {
10 | return response.data as CategoryListType[];
11 | },
12 | }),
13 | getPrioritizedLists: builder.query({
14 | query: () => 'list/prioritize',
15 | providesTags: ['PrioritizedLists'],
16 | transformResponse: (response: any, meta, arg) => {
17 | return response.data as ListType[];
18 | },
19 | }),
20 | addCategory: builder.mutation({
21 | query: category => ({
22 | url: 'list/category',
23 | method: 'POST',
24 | body: category,
25 | credentials: 'include',
26 | }),
27 | invalidatesTags: ['Lists'],
28 | transformResponse: (response: any, meta, arg) => {
29 | return response.data;
30 | },
31 | }),
32 | addListTitle: builder.mutation({
33 | query: title => ({
34 | url: 'list/title',
35 | method: 'POST',
36 | body: title,
37 | credentials: 'include',
38 | }),
39 | invalidatesTags: ['Lists', 'PrioritizedLists'],
40 | transformResponse: (response: any, meta, arg) => {
41 | return response.data;
42 | },
43 | }),
44 | addListItem: builder.mutation({
45 | query: item => ({
46 | url: 'list/items',
47 | method: 'POST',
48 | body: item,
49 | credentials: 'include',
50 | }),
51 | invalidatesTags: ['Lists'],
52 | transformResponse: (response: any, meta, arg) => {
53 | return response.data;
54 | },
55 | }),
56 | editListFlag: builder.mutation({
57 | query: item => ({
58 | url: 'list/flag',
59 | method: 'PUT',
60 | body: item,
61 | credentials: 'include',
62 | }),
63 | invalidatesTags: ['Lists'],
64 | transformResponse: (response: any, meta, arg) => {
65 | return response.data;
66 | },
67 | }),
68 | deleteCategories: builder.mutation({
69 | query: ids => ({
70 | url: 'list/categories',
71 | method: 'DELETE',
72 | body: {ids},
73 | credentials: 'include',
74 | }),
75 | invalidatesTags: ['Lists', 'PrioritizedLists'],
76 | transformResponse: (response: any, meta, arg) => {
77 | return response.data;
78 | },
79 | }),
80 | deleteManyListInCategory: builder.mutation({
81 | query: ids => ({
82 | url: 'list',
83 | method: 'DELETE',
84 | body: {ids},
85 | credentials: 'include',
86 | }),
87 | invalidatesTags: ['Lists', 'PrioritizedLists'],
88 | transformResponse: (response: any, meta, arg) => {
89 | return response.data;
90 | },
91 | }),
92 | }),
93 | });
94 |
95 | export const {
96 | useGetListsQuery,
97 | useGetPrioritizedListsQuery,
98 | useAddCategoryMutation,
99 | useAddListTitleMutation,
100 | useAddListItemMutation,
101 | useEditListFlagMutation,
102 | useDeleteCategoriesMutation,
103 | useDeleteManyListInCategoryMutation,
104 | } = listsApi;
105 |
--------------------------------------------------------------------------------
/src/app/api/messageApi.ts:
--------------------------------------------------------------------------------
1 | import {CategoryListType, ListType} from '../../assets/constants';
2 | import {apiSlice} from './baseApi';
3 |
4 | export const listsApi = apiSlice.injectEndpoints({
5 | endpoints: builder => ({
6 | getMessages: builder.query({
7 | query: () => 'messages',
8 | providesTags: ['Messages'],
9 | transformResponse: (response: any, meta, arg) => {
10 | return response.data as IMessageValues[];
11 | },
12 | }),
13 | addOrEditMessage: builder.mutation({
14 | query: message => ({
15 | url: 'message',
16 | method: 'POST',
17 | body: message,
18 | credentials: 'include',
19 | }),
20 | invalidatesTags: ['Messages'],
21 | transformResponse: (response: any, meta, arg) => {
22 | return response.data;
23 | },
24 | }),
25 | deleteMessages: builder.mutation({
26 | query: ids => ({
27 | url: 'messages',
28 | method: 'DELETE',
29 | body: {ids},
30 | credentials: 'include',
31 | }),
32 | invalidatesTags: ['Messages'],
33 | transformResponse: (response: any, meta, arg) => {
34 | return response.data;
35 | },
36 | }),
37 | }),
38 | });
39 |
40 | export const {
41 | useGetMessagesQuery,
42 | useAddOrEditMessageMutation,
43 | useDeleteMessagesMutation,
44 | } = listsApi;
45 |
--------------------------------------------------------------------------------
/src/app/api/searchApi.ts:
--------------------------------------------------------------------------------
1 | import {ISearchResult} from '../../components/search/types';
2 | import {apiSlice} from './baseApi';
3 |
4 | export const searchApi = apiSlice.injectEndpoints({
5 | endpoints: builder => ({
6 | search: builder.query({
7 | query: params => ({
8 | url: 'search',
9 | params,
10 | }),
11 | providesTags: ['Search'],
12 | transformResponse: (response: any, meta, arg) => {
13 | return response.data as ISearchResult;
14 | },
15 | }),
16 | }),
17 | });
18 |
19 | export const {useSearchQuery} = searchApi;
20 |
--------------------------------------------------------------------------------
/src/app/api/taskApi.ts:
--------------------------------------------------------------------------------
1 | import {apiSlice} from './baseApi';
2 |
3 | export const tasksApi = apiSlice.injectEndpoints({
4 | endpoints: builder => ({
5 | getTasks: builder.query({
6 | query: () => 'tasks',
7 | // providesTags: ['Tasks'],
8 | transformResponse: (response: any, meta, arg) => {
9 | return response.data;
10 | },
11 | }),
12 | // getTaskId: builder.query({
13 | // query: () => 'tasks',
14 | // // providesTags: ['Tasks'],
15 | // transformResponse: (response: any, meta, arg) => {
16 | // return response.data;
17 | // },
18 | // }),
19 | getTasksByDate: builder.query({
20 | query: (date: Date) => {
21 | return {
22 | url: 'tasks/date',
23 | method: 'POST',
24 | body: {date},
25 | };
26 | },
27 | providesTags: ['TasksByDate'],
28 | transformResponse: (response: any, meta, arg) => {
29 | return response.data;
30 | },
31 | }),
32 | getNextTasksByDate: builder.query({
33 | query: (date: Date) => {
34 | return {
35 | url: 'tasks/nextTask',
36 | method: 'POST',
37 | body: {date},
38 | };
39 | },
40 | providesTags: ['NextTask'],
41 | transformResponse: (response: any, meta, arg) => {
42 | return response.data;
43 | },
44 | }),
45 | deleteTask: builder.mutation({
46 | query: id => ({
47 | url: `task/${id}`,
48 | method: 'DELETE',
49 | credentials: 'include',
50 | }),
51 | invalidatesTags: ['TasksByDate', 'NextTask'],
52 | transformResponse: (response: any, meta, arg) => {
53 | return response.data;
54 | },
55 | }),
56 | deleteManyTasks: builder.mutation({
57 | query: ids => ({
58 | url: `tasks`,
59 | method: 'DELETE',
60 | credentials: 'include',
61 | body: {ids},
62 | }),
63 | invalidatesTags: ['TasksByDate', 'NextTask'],
64 | transformResponse: (response: any, meta, arg) => {
65 | return response.data;
66 | },
67 | }),
68 | addOrEditTask: builder.mutation({
69 | query: task => ({
70 | url: 'task',
71 | method: 'POST',
72 | body: task,
73 | credentials: 'include',
74 | }),
75 | invalidatesTags: ['TasksByDate', 'Search', 'NextTask'],
76 | transformResponse: (response: any, meta, arg) => {
77 | return response.data;
78 | },
79 | }),
80 | }),
81 | });
82 |
83 | export const {
84 | useGetTasksQuery,
85 | useAddOrEditTaskMutation,
86 | // useAddOrEditTaskMutation,
87 | useDeleteTaskMutation,
88 | useDeleteManyTasksMutation,
89 | useGetTasksByDateQuery,
90 | useGetNextTasksByDateQuery,
91 | } = tasksApi;
92 |
--------------------------------------------------------------------------------
/src/app/hooks.ts:
--------------------------------------------------------------------------------
1 | import {useDispatch, useSelector} from 'react-redux';
2 | import type {TypedUseSelectorHook} from 'react-redux';
3 | import type {RootState, AppDispatch} from './store';
4 |
5 | // Use throughout your app instead of plain `useDispatch` and `useSelector`
6 | export const useAppDispatch: () => AppDispatch = useDispatch;
7 | export const useAppSelector: TypedUseSelectorHook = useSelector;
8 |
--------------------------------------------------------------------------------
/src/app/store.ts:
--------------------------------------------------------------------------------
1 | import {combineReducers, configureStore} from '@reduxjs/toolkit';
2 | import {
3 | PersistConfig,
4 | persistReducer,
5 | persistStore,
6 | FLUSH,
7 | REHYDRATE,
8 | PAUSE,
9 | PERSIST,
10 | PURGE,
11 | REGISTER,
12 | } from 'redux-persist';
13 | import userSlice from './Reducers/User/userSlice';
14 | import screensSlice from './Reducers/User/screensSlice';
15 | import AsyncStorage from '@react-native-async-storage/async-storage';
16 | import {userApi} from './api/userApi';
17 | import {setupListeners} from '@reduxjs/toolkit/dist/query';
18 | import {apiSlice} from './api/baseApi';
19 | import {tasksApi} from './api/taskApi';
20 | import {listsApi} from './api/listApi';
21 | // ...
22 |
23 | const persistConfig = {
24 | key: 'userReducer',
25 | storage: AsyncStorage,
26 | // whiteList: ['name'],
27 | // version: 1,
28 | };
29 |
30 | const userReducer = persistReducer(persistConfig, userSlice);
31 | const rootReducer = combineReducers({user: userReducer, screens: screensSlice});
32 | export const store = configureStore({
33 | reducer: {
34 | [apiSlice.reducerPath]: apiSlice.reducer,
35 | reducer: rootReducer,
36 | },
37 | middleware: getDefaultMiddleware =>
38 | getDefaultMiddleware({
39 | serializableCheck: false,
40 | immutableCheck: false,
41 | }).concat(apiSlice.middleware),
42 | });
43 | setupListeners(store.dispatch);
44 | export let persistor = persistStore(store);
45 | // Infer the `RootState` and `AppDispatch` types from the store itself
46 | export type RootState = ReturnType;
47 | // Inferred type: {posts: PostsState, comments: CommentsState, users: UsersState}
48 | export type AppDispatch = typeof store.dispatch;
49 |
--------------------------------------------------------------------------------
/src/assets/3d/Scene.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | Auto-generated by: https://github.com/pmndrs/gltfjsx
3 | Command: npx gltfjsx@6.1.4 scene.gltf --transform -t
4 | Author: Jovian Blaze (https://sketchfab.com/Jovian_Blaze)
5 | License: CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)
6 | Source: https://sketchfab.com/3d-models/hallow-cube-b702b517a0d3499fb0cb9b92b7bb413d
7 | Title: Hallow Cube
8 | */
9 |
10 | import * as THREE from 'three';
11 | import React, {useRef} from 'react';
12 | import {useGLTF} from '@react-three/drei/native';
13 | import {GLTF} from 'three-stdlib';
14 |
15 | type GLTFResult = GLTF & {
16 | nodes: {
17 | Plane005_0: THREE.Mesh;
18 | Plane004_0: THREE.Mesh;
19 | Plane003_0: THREE.Mesh;
20 | Plane002_0: THREE.Mesh;
21 | Plane001_0: THREE.Mesh;
22 | Cube_0: THREE.Mesh;
23 | Plane_0: THREE.Mesh;
24 | };
25 | materials: {
26 | ['Material.001']: THREE.MeshStandardMaterial;
27 | Material: THREE.MeshStandardMaterial;
28 | };
29 | };
30 |
31 | export default function Scene(props: JSX.IntrinsicElements['group']) {
32 | const {nodes, materials} = useGLTF('/scene-transformed.glb') as GLTFResult;
33 | // return null;
34 | return (
35 |
36 |
37 |
44 |
51 |
57 |
64 |
71 |
72 |
79 |
80 |
81 | );
82 | }
83 |
84 | // useGLTF.preload(require('./scene-transformed.glb'));
85 |
--------------------------------------------------------------------------------
/src/assets/3d/scene-transformed.glb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/src/assets/3d/scene-transformed.glb
--------------------------------------------------------------------------------
/src/assets/3d/scene.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/src/assets/3d/scene.bin
--------------------------------------------------------------------------------
/src/assets/fonts/Montserrat-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/src/assets/fonts/Montserrat-Light.ttf
--------------------------------------------------------------------------------
/src/assets/fonts/Montserrat-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/src/assets/fonts/Montserrat-Medium.ttf
--------------------------------------------------------------------------------
/src/assets/fonts/Montserrat-MediumItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/src/assets/fonts/Montserrat-MediumItalic.ttf
--------------------------------------------------------------------------------
/src/assets/fonts/Montserrat-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/src/assets/fonts/Montserrat-Regular.ttf
--------------------------------------------------------------------------------
/src/assets/fonts/Montserrat-Thin.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/src/assets/fonts/Montserrat-Thin.ttf
--------------------------------------------------------------------------------
/src/assets/fonts/Report-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/src/assets/fonts/Report-Regular.ttf
--------------------------------------------------------------------------------
/src/assets/fonts/SansSerifFLF.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/src/assets/fonts/SansSerifFLF.otf
--------------------------------------------------------------------------------
/src/assets/privacy/privacy.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/src/assets/privacy/privacy.pdf
--------------------------------------------------------------------------------
/src/assets/privacy/term_of_use.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/omeratt/HereApp-FrontEnd/0fd3f94ee5706ba277d1e343a68deb9f292d8508/src/assets/privacy/term_of_use.pdf
--------------------------------------------------------------------------------
/src/assets/svg/ArrowDown.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/src/assets/svg/BoxIcon.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/assets/svg/BoxIconGreen.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/assets/svg/Done.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | Done
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/assets/svg/DoneGreen.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | Done
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/assets/svg/Google.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/assets/svg/GreenSelect.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/src/assets/svg/HamburgerBtn.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/assets/svg/HamburgerFixed.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/assets/svg/Hi.svg:
--------------------------------------------------------------------------------
1 |
2 | Hi ! Nice to meet you. I’m HERE to help you organize everything
7 |
8 |
--------------------------------------------------------------------------------
/src/assets/svg/IAmNotStupid.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/assets/svg/Logo.svg:
--------------------------------------------------------------------------------
1 |
2 | H E RE
3 |
4 |
--------------------------------------------------------------------------------
/src/assets/svg/MenuIcon.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/src/assets/svg/MenuIconGreen.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/src/assets/svg/NotePlus.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/assets/svg/NumCheckBox.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/assets/svg/PizzaWidget.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/assets/svg/PlayHere.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/src/assets/svg/Search.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/assets/svg/SearchBtn.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/src/assets/svg/SearchGreen.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/src/assets/svg/Select.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/src/assets/svg/SendBtn.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/src/assets/svg/StartButton.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 | Let’s start
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/src/assets/svg/ToggleWidget.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/src/assets/svg/Trash.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/assets/svg/TrashBlack.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/assets/svg/TrashGreen.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/assets/svg/TrashWhite.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/assets/svg/XBtn.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/assets/svg/XBtnFixed.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/assets/svg/index.ts:
--------------------------------------------------------------------------------
1 | import HereLogo from './Logo.svg';
2 | import DoneButton from './Done.svg';
3 | import GreenDoneButton from './DoneGreen.svg';
4 | import StartButton from './StartButton.svg';
5 | import Hi from './Hi.svg';
6 | import Search from './Search.svg';
7 | import SearchGreen from './SearchGreen.svg';
8 | import MenuIcon from './MenuIcon.svg';
9 | import MenuIconGreen from './MenuIconGreen.svg';
10 | import plusIconOutlined from './plusIconOutlined.svg';
11 | import BoxIcon from './BoxIcon.svg';
12 | import BoxIconGreen from './BoxIconGreen.svg';
13 | import ArrowDown from './ArrowDown.svg';
14 | import NumCheckbox from './NumCheckBox.svg';
15 | import VIcon from './vIcon.svg';
16 | import PlayHere from './PlayHere.svg';
17 | import XBtn from './XBtn.svg';
18 | import XBtnFixed from './XBtnFixed.svg';
19 | import HamburgerBtn from './HamburgerBtn.svg';
20 | import HamburgerFixed from './HamburgerFixed.svg';
21 | import SearchBtn from './SearchBtn.svg';
22 | import Continue from './Continue.svg';
23 | import Select from './Select.svg';
24 | import GreenSelect from './GreenSelect.svg';
25 | import NotePlus from './NotePlus.svg';
26 | import Trash from './Trash.svg';
27 | import TrashBlack from './TrashBlack.svg';
28 | import TrashWhite from './TrashWhite.svg';
29 | import TrashGreen from './TrashGreen.svg';
30 | import SendBtn from './SendBtn.svg';
31 | import IAmNotStupidTxt from './IAmNotStupidTxt.svg';
32 | import IAmNotStupid from './IAmNotStupid.svg';
33 | import StupidSubTitle from './StupidSubTitle.svg';
34 | import TimeTips from './TimeTips.svg';
35 | import SelectWidgetTitle from './SelectWidgetTitle.svg';
36 | import PizzaWidget from './PizzaWidget.svg';
37 | import ToggleWidget from './ToggleWidget.svg';
38 | import ImNotStupidGreen from './I_AM_NOT_Stupid_Green.svg';
39 | import Google from './Google.svg';
40 |
41 | const SVG = {
42 | IAmNotStupid,
43 | StupidSubTitle,
44 | IAmNotStupidTxt,
45 | TrashWhite,
46 | TrashGreen,
47 | SendBtn,
48 | TrashBlack,
49 | Trash,
50 | GreenSelect,
51 | NotePlus,
52 | Select,
53 | Continue,
54 | XBtn,
55 | XBtnFixed,
56 | SearchBtn,
57 | HamburgerBtn,
58 | HamburgerFixed,
59 | PlayHere,
60 | HereLogo,
61 | DoneButton,
62 | GreenDoneButton,
63 | StartButton,
64 | Hi,
65 | Search,
66 | MenuIcon,
67 | plusIconOutlined,
68 | BoxIcon,
69 | ArrowDown,
70 | NumCheckbox,
71 | VIcon,
72 | SearchGreen,
73 | MenuIconGreen,
74 | BoxIconGreen,
75 | TimeTips,
76 | SelectWidgetTitle,
77 | PizzaWidget,
78 | ToggleWidget,
79 | ImNotStupidGreen,
80 | Google,
81 | };
82 | export default SVG;
83 |
--------------------------------------------------------------------------------
/src/assets/svg/plusIconOutlined.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/assets/svg/vIcon.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/components/CalendarModal.tsx:
--------------------------------------------------------------------------------
1 | import {StyleSheet, Text, View} from 'react-native';
2 | import React, {FC} from 'react';
3 | import Modal from 'react-native-modal';
4 | // import {Calendar} from 'react-native-calendars';
5 | // import CalendarList from 'react-native-calendars/src/calendar-list/new';
6 | import constants from '../assets/constants';
7 | import {CalendarList, DateData} from 'react-native-calendars';
8 |
9 | interface Props {
10 | visible: boolean;
11 | toggleCalendar: () => void;
12 | FetchTasks: (date: Date) => void;
13 | findDateAndScroll: (DateToCheck: Date) => void;
14 | dates?: any;
15 | }
16 | const CalendarModal: FC = ({
17 | visible,
18 | toggleCalendar,
19 | FetchTasks,
20 | findDateAndScroll,
21 | }) => {
22 | const height = constants.HEIGHT * 0.4997776653990315251025047042269;
23 | const [date, setDate] = React.useState('');
24 | const onDayPress = React.useCallback((date: DateData) => {
25 | setDate(date.dateString);
26 | findDateAndScroll(new Date(date.dateString));
27 | }, []);
28 |
29 | return (
30 |
41 |
50 | ({
61 | // index,
62 | // length: height,
63 | // offset: height * index,
64 | // })}
65 | theme={{
66 | textDayFontFamily: constants.Fonts.text,
67 | backgroundColor: constants.colors.BGC,
68 | calendarBackground: constants.colors.OFF_WHITE,
69 | selectedDayBackgroundColor: constants.colors.GREEN,
70 | textMonthFontFamily: constants.Fonts.paragraph,
71 | textDayHeaderFontFamily: constants.Fonts.paragraph,
72 | // todayTextColor: constants.colors.GREY,
73 | todayTextColor: '#B9AB85',
74 | dayTextColor: constants.colors.BGC,
75 | selectedDayTextColor: constants.colors.BGC,
76 | arrowColor: constants.colors.UNDER_LINE,
77 | textSectionTitleColor: constants.colors.GREY,
78 | }}
79 | pagingEnabled
80 | />
81 |
82 | );
83 | };
84 |
85 | export default React.memo(CalendarModal);
86 |
87 | const styles = StyleSheet.create({});
88 |
--------------------------------------------------------------------------------
/src/components/CheckBox.tsx:
--------------------------------------------------------------------------------
1 | import {StyleSheet, Text, TouchableOpacity} from 'react-native';
2 | import React from 'react';
3 | import constants from '../assets/constants';
4 | import {CheckBoxListType} from '../screens/list/CreateOrEditList';
5 | import SVG from '../assets/svg';
6 |
7 | interface props {
8 | size: number;
9 | index?: number;
10 | isFilled?: boolean;
11 | borderColor?: string;
12 | onPress?: () => void;
13 | type?: CheckBoxListType;
14 | colorFill?: string;
15 | disabled?: boolean;
16 | }
17 | const CheckBox = ({
18 | size,
19 | type,
20 | index,
21 | onPress,
22 | isFilled,
23 | borderColor,
24 | disabled,
25 | colorFill = constants.colors.BGC,
26 | }: props) => {
27 | const isNumber = type === 'NUMBERS';
28 |
29 | const backgroundColor = React.useMemo(() => {
30 | if (type === 'DOTS') {
31 | return constants.colors.BLACK;
32 | } else if (!type && isFilled !== undefined) {
33 | //normal checkBox
34 |
35 | return isFilled ? colorFill : constants.colors.OFF_WHITE;
36 | } else return constants.colors.OFF_WHITE;
37 | }, [isFilled, type]);
38 |
39 | const checkBoxSize = type === 'DOTS' ? size / 1.5 : size;
40 | return (
41 |
58 | {type === 'V' && isFilled && (
59 |
60 | )}
61 | {isNumber && (
62 |
69 | {`${index}.`}
70 |
71 | )}
72 |
73 | );
74 | };
75 | export default React.memo(CheckBox);
76 | const styles = StyleSheet.create({
77 | circle: {
78 | // borderRadius: 9999,
79 | borderWidth: 0.7,
80 | borderColor: constants.colors.BGC,
81 | alignItems: 'center',
82 | justifyContent: 'center',
83 | // marginBottom: '1.5%',
84 | },
85 | });
86 |
--------------------------------------------------------------------------------
/src/components/CircleCheckBox.tsx:
--------------------------------------------------------------------------------
1 | import {StyleSheet, Text, View} from 'react-native';
2 | import React from 'react';
3 | import constants from '../assets/constants';
4 |
5 | interface props {
6 | size: number;
7 | fill?: string;
8 | borderColor?: string;
9 | notCheckedFillColor?: string;
10 | }
11 | export default function CircleCheckBox({
12 | size,
13 | fill,
14 | borderColor,
15 | notCheckedFillColor = constants.colors.OFF_WHITE,
16 | }: props) {
17 | return (
18 |
31 | );
32 | }
33 |
34 | const styles = StyleSheet.create({
35 | circle: {
36 | // borderRadius: 9999,
37 | borderWidth: 1,
38 | borderColor: constants.colors.GREY,
39 |
40 | // width: '0%',
41 | // height: '0%',
42 | // flex: 0.00000000000001,
43 | // borderRadius: 99999,
44 | },
45 | });
46 |
--------------------------------------------------------------------------------
/src/components/FloatHERE.tsx:
--------------------------------------------------------------------------------
1 | import {StyleSheet, Text, View, TouchableOpacity} from 'react-native';
2 | import React, {memo, useEffect} from 'react';
3 | import constants from '../assets/constants';
4 |
5 | import Animated, {
6 | FadeIn,
7 | FadeOut,
8 | runOnJS,
9 | runOnUI,
10 | useAnimatedStyle,
11 | useSharedValue,
12 | withRepeat,
13 | withSpring,
14 | withTiming,
15 | } from 'react-native-reanimated';
16 | const {colors, rf, WIDTH, HEIGHT, Fonts} = constants;
17 | const config = {
18 | mass: 25,
19 | damping: 20,
20 | overshootClamping: true,
21 | stiffness: 100,
22 | restSpeedThreshold: 0.01,
23 | };
24 | interface IFloatHERE {
25 | onPress: () => void;
26 | }
27 | const FloatHERE: React.FC = ({onPress}) => {
28 | const sharedYValue = useSharedValue(0);
29 | const sharedXValue = useSharedValue(7);
30 | const sharedOpacity = useSharedValue(2);
31 |
32 | useEffect(() => {
33 | // sharedYValue.value = withRepeat(withSpring(-5, config), -1, true);
34 | // sharedYValue.value = withRepeat(withTiming(-5, {duration: 1000}), -1, true);
35 | // sharedXValue.value = withRepeat(withSpring(15, config), -1, true);
36 | sharedOpacity.value = withRepeat(
37 | withTiming(0.5, {duration: 800}),
38 | -1,
39 | true,
40 | );
41 | }, []);
42 | return (
43 |
47 |
48 |
49 | H
50 |
56 | E
57 |
58 | RE
59 |
60 |
61 |
62 | );
63 | };
64 |
65 | export default memo(FloatHERE);
66 |
67 | const styles = StyleSheet.create({
68 | container: {
69 | height: '100%',
70 | // backgroundColor: 'grey',
71 | },
72 | text: {
73 | fontFamily: Fonts.text_medium,
74 | color: colors.BGC,
75 | fontSize: rf(28),
76 | textAlign: 'right',
77 | // textAlignVertical: 'bottom',
78 | },
79 | });
80 |
--------------------------------------------------------------------------------
/src/components/Line.tsx:
--------------------------------------------------------------------------------
1 | import {StyleSheet, View, ViewStyle} from 'react-native';
2 | import React from 'react';
3 | import constants from '../assets/constants';
4 | import Animated, {
5 | interpolate,
6 | useAnimatedStyle,
7 | useDerivedValue,
8 | useSharedValue,
9 | withTiming,
10 | } from 'react-native-reanimated';
11 | interface props {
12 | lengthPercentage?: number;
13 | vertical?: boolean;
14 | rotate180?: boolean;
15 | style?: ViewStyle;
16 | lineColor?: string;
17 | strength?: number;
18 | }
19 | export default function Line({
20 | lengthPercentage = 100,
21 | vertical = false,
22 | style,
23 | rotate180 = false,
24 | lineColor = constants.colors.GREY,
25 | strength = 2,
26 | }: props) {
27 | const animation = useSharedValue(0);
28 |
29 | const width = useDerivedValue(() => {
30 | return interpolate(animation.value, [0, 1], [0, lengthPercentage]);
31 | });
32 |
33 | const height = useDerivedValue(() => {
34 | return interpolate(animation.value, [0, 1], [0, lengthPercentage]);
35 | });
36 |
37 | const animatedStyle = useAnimatedStyle(() => {
38 | const animatedConfig = vertical
39 | ? {
40 | height: height.value + '%',
41 | width: strength,
42 | ...(rotate180 && {transform: [{rotate: '180deg'}]}),
43 | }
44 | : {
45 | ...(rotate180 && {transform: [{rotate: '180deg'}]}),
46 |
47 | width: width.value + '%',
48 | height: strength,
49 | };
50 | return {
51 | ...animatedConfig,
52 | };
53 | });
54 |
55 | const startAnimation = () => {
56 | animation.value = withTiming(1, {
57 | duration: 2000,
58 | });
59 | };
60 | const endAnimation = () => {
61 | animation.value = withTiming(0, {
62 | duration: 2000,
63 | });
64 | };
65 | const inner = React.useCallback(() => {
66 | startAnimation();
67 | }, []);
68 | React.useEffect(() => {
69 | inner();
70 | return () => {
71 | animation.value = 0;
72 | };
73 | }, [inner]);
74 |
75 | return (
76 |
89 | );
90 | }
91 |
92 | const styles = StyleSheet.create({
93 | line: {
94 | // backgroundColor: constants.colors.GREY,
95 | },
96 | });
97 |
--------------------------------------------------------------------------------
/src/components/Notes.tsx:
--------------------------------------------------------------------------------
1 | import {StyleSheet, Text, TouchableOpacity} from 'react-native';
2 | import Animated, {
3 | useSharedValue,
4 | withTiming,
5 | useAnimatedStyle,
6 | } from 'react-native-reanimated';
7 |
8 | import React, {useRef} from 'react';
9 | import Line from './Line';
10 | import constants from '../assets/constants';
11 |
12 | const openModeSize = constants.HEIGHT * 0.18;
13 | const closeModeSize = constants.HEIGHT * 0.09;
14 | const Notes = () => {
15 | const itemHeight = useRef(closeModeSize);
16 | const animatedHeight = useSharedValue(itemHeight.current);
17 |
18 | const handlePress = () => {
19 | const height =
20 | itemHeight.current === openModeSize ? closeModeSize : openModeSize;
21 | animatedHeight.value = withTiming(height, {
22 | duration: 100,
23 | });
24 | itemHeight.current = height;
25 | };
26 |
27 | const animatedStyle = useAnimatedStyle(() => {
28 | return {
29 | height: animatedHeight.value,
30 | };
31 | }, [animatedHeight.value, itemHeight]);
32 |
33 | return (
34 |
35 |
42 |
43 | Note
44 |
45 |
46 | );
47 | };
48 |
49 | export default Notes;
50 |
51 | const styles = StyleSheet.create({
52 | note: {
53 | width: '100%',
54 | borderColor: constants.colors.UNDER_LINE,
55 | borderWidth: 1,
56 | borderTopWidth: 0,
57 | borderBottomRightRadius: 25,
58 | borderBottomLeftRadius: 25,
59 | },
60 | noteTxtContainer: {
61 | padding: '5.2%',
62 | },
63 | sectionTxt: {
64 | color: constants.colors.BLACK,
65 | fontFamily: constants.Fonts.text,
66 | fontSize: 18,
67 | },
68 | });
69 |
--------------------------------------------------------------------------------
/src/components/PlusIcon.tsx:
--------------------------------------------------------------------------------
1 | import {StyleProp, StyleSheet, TouchableOpacity, ViewStyle} from 'react-native';
2 | import React, {FC, memo} from 'react';
3 | import SVG from '../assets/svg';
4 | import constants from '../assets/constants';
5 |
6 | interface Props {
7 | onPress?: () => void;
8 | size?: number;
9 | style?: StyleProp;
10 | }
11 | const PlusIcon: FC = ({onPress, style, size}) => {
12 | return (
13 |
14 |
20 |
21 | );
22 | };
23 |
24 | export default memo(PlusIcon);
25 |
26 | const styles = StyleSheet.create({
27 | container: {zIndex: 1},
28 | plusIcon: {
29 | color: constants.colors.BLACK,
30 | borderRadius: 9999,
31 | backgroundColor: constants.colors.OFF_WHITE,
32 | // elevation: 6,
33 | },
34 | });
35 |
--------------------------------------------------------------------------------
/src/components/Privacy.tsx:
--------------------------------------------------------------------------------
1 | import {StyleSheet, Text, Modal, View, TouchableOpacity} from 'react-native';
2 | import React, {useEffect} from 'react';
3 | import Pdf from 'react-native-pdf';
4 | import constants from '../assets/constants';
5 | import AntDesign from 'react-native-vector-icons/AntDesign';
6 | import {useNavigation} from '@react-navigation/native';
7 | import {useDispatch} from 'react-redux';
8 | import {setFocus} from '../app/Reducers/User/screensSlice';
9 | const pdf = require('../assets/privacy/privacy.pdf');
10 | const Privacy = () => {
11 | const navigation = useNavigation();
12 | const back = () => navigation.goBack();
13 | const dispatch = useDispatch();
14 | useEffect(() => {
15 | const subscribe = navigation.addListener('focus', e => {
16 | dispatch(setFocus({privacy: true}));
17 | });
18 | return subscribe;
19 | }, []);
20 | return (
21 |
22 |
33 |
38 |
39 | {
43 | console.log(error);
44 | }}
45 | style={{flex: 1}}
46 | />
47 |
48 | );
49 | };
50 |
51 | export default Privacy;
52 |
53 | const styles = StyleSheet.create({});
54 |
--------------------------------------------------------------------------------
/src/components/RenderListCategoryHome.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | Pressable,
3 | StyleSheet,
4 | Text,
5 | TouchableHighlight,
6 | View,
7 | } from 'react-native';
8 | import React, {useState} from 'react';
9 | import {ListRenderItem} from '@shopify/flash-list';
10 | import constants, {CategoryListType, ListType} from '../assets/constants';
11 | import {useNavigation} from '@react-navigation/native';
12 | // import {ListCategoryWidth} from '../screens/Home';
13 | const ListCategoryWidth = constants.WIDTH * 0.2925925996568468;
14 |
15 | const RenderListCategoryHome:
16 | | ListRenderItem
17 | | null
18 | | undefined = props => {
19 | const [borderWidth, setBorderWidth] = useState(1);
20 | const navigation = useNavigation();
21 | const findCategoryIndex = () => {
22 | const listIndex = (props.extraData.lists as CategoryListType[]).findIndex(
23 | list => list._id === props.item.categoryId,
24 | );
25 | return listIndex;
26 | };
27 | const findListIndexInCategory = (categoryIndex: number) => {
28 | const listIndex = (props.extraData.lists as CategoryListType[])[
29 | categoryIndex
30 | ]?.lists?.findIndex(list => list._id === props.item._id);
31 | return listIndex;
32 | };
33 | const navigateToList = React.useCallback(() => {
34 | const categoryIndex = findCategoryIndex();
35 | const listIndex = findListIndexInCategory(categoryIndex);
36 | navigation.navigate(
37 | 'ListAndNotesStack' as never,
38 | {
39 | screen: 'CreateOrEditList' as never,
40 | params: {categoryIndex, listIndex, navFromHome: true} as never,
41 | } as never,
42 | );
43 | }, [props.index]);
44 | return (
45 | setBorderWidth(0)}
49 | onPressOut={() => setBorderWidth(1)}
50 | style={[styles.myListCategory, {borderWidth}]}>
51 |
52 | {props.item.title}
53 |
54 |
55 | );
56 | };
57 |
58 | export default React.memo(RenderListCategoryHome);
59 |
60 | const styles = StyleSheet.create({
61 | myListCategory: {
62 | width: ListCategoryWidth + 5,
63 | height: '100%',
64 | padding: '0.1%',
65 | marginRight: 5,
66 | borderRadius: 40,
67 | borderWidth: 1,
68 | borderColor: constants.colors.BLACK,
69 | justifyContent: 'center',
70 | alignContent: 'center',
71 | backgroundColor: constants.colors.OFF_WHITE,
72 | elevation: 1,
73 | },
74 | listTxt: {
75 | color: constants.colors.BGC,
76 | textAlign: 'center',
77 | fontSize: constants.rf(13),
78 | fontFamily: constants.Fonts.text,
79 | },
80 | });
81 |
--------------------------------------------------------------------------------
/src/components/SetTimeContent.tsx:
--------------------------------------------------------------------------------
1 | import {StyleSheet, Text, TouchableOpacity, View} from 'react-native';
2 | import React, {FC} from 'react';
3 | import constants from '../assets/constants';
4 |
5 | type DateFormat = 'datetime' | 'time' | 'date';
6 | interface Props {
7 | dateFormat?: DateFormat;
8 | /**
9 | * @param type which format to use in date picker
10 | * @param _isDateEnd should date picker use setTargetDate or setEndDate
11 | */
12 | onPress: (type: DateFormat, _isDateEnd: boolean) => void;
13 | title: string;
14 | buttonTxt: string;
15 | }
16 |
17 | const SetTimeContent: FC = ({onPress, title, buttonTxt, dateFormat}) => {
18 | return (
19 |
20 |
21 |
22 | {
25 | onPress(dateFormat || 'date', title === 'End Date');
26 | }}>
27 |
28 | {buttonTxt}
29 |
30 |
31 | {
33 | onPress(dateFormat || 'date', title === 'End Date');
34 | }}>
35 | {title}
36 |
37 |
38 |
39 |
40 | );
41 | };
42 |
43 | export default React.memo(SetTimeContent);
44 |
45 | const styles = StyleSheet.create({
46 | textAndToggleContainer: {
47 | justifyContent: 'center',
48 | },
49 | flexOneAndJustifyCenter: {
50 | flex: 1,
51 | justifyContent: 'center',
52 | },
53 | TxtAndToggleInSetTime: {
54 | paddingLeft: '5.2%',
55 | flexDirection: 'row-reverse',
56 | justifyContent: 'space-between',
57 | alignItems: 'center',
58 | height: '100%',
59 | },
60 | subSectionTxt: {
61 | color: constants.colors.BLACK,
62 | fontFamily: constants.Fonts.text,
63 | fontSize: 14,
64 | },
65 | btn: {
66 | borderColor: constants.colors.GREY,
67 | borderWidth: 0.5,
68 | borderRadius: 15,
69 | width: constants.WIDTH * 0.3,
70 | alignItems: 'center',
71 | justifyContent: 'center',
72 | textAlign: 'center',
73 | },
74 | btnTxt: {
75 | color: constants.colors.UNDER_LINE,
76 | textAlign: 'center',
77 | fontSize: 12,
78 | fontFamily: constants.Fonts.text,
79 | },
80 | });
81 |
--------------------------------------------------------------------------------
/src/components/TermOfUse.tsx:
--------------------------------------------------------------------------------
1 | import {StyleSheet, Text, Modal, View, TouchableOpacity} from 'react-native';
2 | import React, {useEffect} from 'react';
3 | import Pdf from 'react-native-pdf';
4 | import constants from '../assets/constants';
5 | import AntDesign from 'react-native-vector-icons/AntDesign';
6 | import {useNavigation} from '@react-navigation/native';
7 | import {useDispatch} from 'react-redux';
8 | import {setFocus} from '../app/Reducers/User/screensSlice';
9 | const pdf = require('../assets/privacy/term_of_use.pdf');
10 | const TermOfUse = () => {
11 | const navigation = useNavigation();
12 | const back = () => navigation.goBack();
13 | const dispatch = useDispatch();
14 | useEffect(() => {
15 | const subscribe = navigation.addListener('focus', e => {
16 | dispatch(setFocus({termOfUse: true}));
17 | });
18 | return subscribe;
19 | }, []);
20 | return (
21 |
22 |
33 |
38 |
39 | {
43 | console.log(error);
44 | }}
45 | style={{flex: 1}}
46 | />
47 |
48 | );
49 | };
50 |
51 | export default TermOfUse;
52 |
53 | const styles = StyleSheet.create({});
54 |
--------------------------------------------------------------------------------
/src/components/TextInput.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | StyleSheet,
3 | Text,
4 | View,
5 | TextInput as Input,
6 | TextInputProps,
7 | Dimensions,
8 | Keyboard,
9 | StyleProp,
10 | ViewStyle,
11 | } from 'react-native';
12 | import React, {forwardRef, useImperativeHandle, useRef, useState} from 'react';
13 | import Ionicons from 'react-native-vector-icons/Ionicons';
14 | import constants from '../assets/constants';
15 |
16 | export interface InputHandle {
17 | getValue: () => string;
18 | onFocus: () => void;
19 | blur: () => void;
20 | setNativeProps: (obj: object) => void;
21 | setText: (value: string) => void;
22 | }
23 | interface MyTextInputProps extends TextInputProps {
24 | containerStyle?: StyleProp;
25 | }
26 | const TextInput = forwardRef((props, ref) => {
27 | const [isSecurePass, setSecurePass] = useState(
28 | props.secureTextEntry ? true : false,
29 | );
30 | const [value, setValue] = useState('');
31 | const textInputRef = useRef (null);
32 | const handleEyeIconPress = () => {
33 | setSecurePass(!isSecurePass);
34 | };
35 | useImperativeHandle(ref, () => ({
36 | getValue: () => value,
37 | onFocus: () => textInputRef.current?.focus(),
38 | setNativeProps: (obj: object) => textInputRef.current?.setNativeProps(obj),
39 | blur: () => () => textInputRef.current?.blur(),
40 | setText: (value: string) => {
41 | textInputRef.current?.setNativeProps({text: value});
42 | },
43 | }));
44 | Keyboard.addListener('keyboardDidHide', () => {
45 | textInputRef?.current?.blur();
46 | });
47 | return (
48 |
50 |
65 |
66 | {props.secureTextEntry && (
67 |
73 | )}
74 |
75 | );
76 | });
77 | export default React.memo(TextInput);
78 | const styles = StyleSheet.create({
79 | container: {
80 | flexDirection: 'row',
81 | alignItems: 'flex-end',
82 | justifyContent: 'flex-end',
83 | },
84 | textInput: {
85 | marginTop: '10%',
86 | paddingBottom: -5,
87 | borderBottomColor: constants.colors.UNDER_LINE,
88 | borderBottomWidth: 1,
89 | width: '70%',
90 | color: constants.colors.BGC,
91 | fontFamily: constants.Fonts.text,
92 | },
93 | eyeIcon: {
94 | position: 'absolute',
95 | color: constants.colors.BGC,
96 | left: 0.7 * constants.WIDTH - 20,
97 | },
98 | placeHolder: {
99 | fontWeight: '300',
100 | },
101 | });
102 |
--------------------------------------------------------------------------------
/src/components/WeeklyCalender.tsx:
--------------------------------------------------------------------------------
1 | export interface DateObject {
2 | day: number;
3 | dayName: string;
4 | month: string;
5 | fullDate: Date;
6 | }
7 |
8 | export const compareDates = (date1: Date, date2: Date): boolean => {
9 | return date1?.toDateString() === date2?.toDateString();
10 | };
11 |
12 | export const getShortName = (dayOfWeek: number): string => {
13 | const names = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
14 | return names[dayOfWeek];
15 | };
16 | export const getRealDate = (
17 | date?: Date,
18 | isSetToCurrentHours?: boolean,
19 | ): Date => {
20 | const fixedDate = date ? date : new Date();
21 | const realDate = new Date(
22 | fixedDate.getTime() - fixedDate.getTimezoneOffset() * 60000,
23 | );
24 | if (isSetToCurrentHours) {
25 | const time = new Date().toLocaleTimeString();
26 | const [hours, minutes] = time.split(':');
27 | realDate.setUTCHours(+hours, +minutes);
28 | }
29 | return realDate;
30 | };
31 |
32 | export const getTimeFromDateString = (
33 | date?: string,
34 | isRealDate?: boolean,
35 | isIn24Hours?: boolean,
36 | ) => {
37 | if (!date) return ' ';
38 | // console.log()
39 | const fixedDate = isRealDate
40 | ? getRealDate(new Date(date)).toISOString()
41 | : date;
42 | const itemTime = fixedDate.split('T')[1];
43 | const [hours, minutes] = itemTime.split(':');
44 | if (isIn24Hours) return `${hours}:${minutes} `;
45 | const amOrPm = +hours >= 12 ? 'PM' : 'AM';
46 | const hoursIn12Hour = +hours % 12 || 12;
47 | const itemHours = `${hoursIn12Hour}:${minutes} ${amOrPm}`;
48 | return itemHours;
49 | };
50 |
51 | export function getDatesForYear(_date: Date): Record {
52 | const year = _date.getFullYear();
53 | const _month = _date.getMonth();
54 | const dates: Record = {};
55 |
56 | // Loop over all days of the year
57 | for (let month = _month; month < _month + 12 * 1; month++) {
58 | const numDaysInMonth = new Date(year, month + 1, 0).getDate();
59 | for (let day = 1; day <= numDaysInMonth; day++) {
60 | const date = new Date(year, month, day);
61 | const dayName = getShortName(date.getDay());
62 | const formattedMonth = date.toLocaleString('default', {month: 'short'});
63 | const key = date.toLocaleDateString();
64 | dates[key] = {
65 | day,
66 | dayName,
67 | month: formattedMonth,
68 | fullDate: date,
69 | };
70 | }
71 | }
72 | return dates;
73 | }
74 |
--------------------------------------------------------------------------------
/src/components/boardingBox/BoardingBoxWrapper.tsx:
--------------------------------------------------------------------------------
1 | import {LayoutChangeEvent, StyleSheet, Text, View} from 'react-native';
2 | import React, {ReactElement, ReactNode, cloneElement, useState} from 'react';
3 | import SVG from '../../assets/svg';
4 | import constants from '../../assets/constants';
5 | import {TaskType} from '../../app/Reducers/User/userSlice';
6 | import Animated, {ZoomIn, ZoomOut} from 'react-native-reanimated';
7 | type Children = P & {children?: ReactNode};
8 |
9 | interface INextTaskProps {
10 | navToTask?: (task: TaskType) => void;
11 | updateTask?: (taskId: string, done: boolean) => Promise;
12 | }
13 | interface LastMessageProps {
14 | message?: IMessagesProps;
15 | isLoading?: boolean;
16 | }
17 | interface BoardingBoxWrapperProps {
18 | Component?: any;
19 | showPlusIcon?: boolean;
20 | basicStyle?: boolean;
21 | nextTaskProps?: INextTaskProps;
22 | LastMessageProps?: LastMessageProps;
23 | }
24 | const BoardingBoxWrapper: React.FC = ({
25 | Component,
26 | showPlusIcon,
27 | basicStyle = true,
28 | nextTaskProps = {},
29 | LastMessageProps = {},
30 | }) => {
31 | const [width, setWidth] = useState();
32 | const [height, setHeight] = useState();
33 |
34 | const handleLayout = (e: LayoutChangeEvent) => {
35 | const {width, height} = e.nativeEvent.layout;
36 | setWidth(width);
37 | setHeight(height);
38 | };
39 | const topBoxStyle = {
40 | ...(height && basicStyle && {paddingTop: `${(24 / height) * 100}%`}),
41 | ...(width && basicStyle && {paddingHorizontal: `${(14 / width) * 100}%`}),
42 | };
43 | // const formattedText;
44 | return (
45 |
50 | {Component && width && height && (
51 |
52 |
59 |
60 | )}
61 | {showPlusIcon && (
62 |
63 |
68 |
69 | )}
70 |
71 | );
72 | };
73 |
74 | export default React.memo(BoardingBoxWrapper);
75 |
76 | const styles = StyleSheet.create({
77 | box: {
78 | flex: 1,
79 | margin: '1%',
80 | // padding: '1%',
81 | borderRadius: 25,
82 | borderWidth: 1,
83 | borderColor: constants.colors.UNDER_LINE,
84 | // backgroundColor: 'cyan',
85 | backgroundColor: constants.colors.OFF_WHITE,
86 | elevation: 2,
87 | overflow: 'hidden',
88 | },
89 | topBox: {
90 | height: '100%',
91 | width: '100%',
92 | },
93 | bottomPlusBox: {
94 | height: '15%',
95 | },
96 | boxPlusIcon: {},
97 | });
98 |
--------------------------------------------------------------------------------
/src/components/boardingBox/PizzaBox.tsx:
--------------------------------------------------------------------------------
1 | import {LayoutChangeEvent, StyleSheet, View} from 'react-native';
2 | import React, {useState} from 'react';
3 | import constants from '../../assets/constants';
4 | import Pizza from '../playGround/Pizza';
5 |
6 | const NextTask: React.FC = () => {
7 | const [size, setSize] = useState(0);
8 | const onLayout = (e: LayoutChangeEvent) => {
9 | const {height, width} = e.nativeEvent.layout;
10 | const fixeDim = height > width ? width : height;
11 | setSize(fixeDim * 0.85);
12 | };
13 | return (
14 |
15 | {size !== 0 && (
16 |
21 | )}
22 |
23 | );
24 | };
25 |
26 | export default React.memo(NextTask);
27 |
28 | const styles = StyleSheet.create({
29 | container: {flex: 1, alignItems: 'center', justifyContent: 'center'},
30 | });
31 |
--------------------------------------------------------------------------------
/src/components/boardingBox/ToggleBtn.tsx:
--------------------------------------------------------------------------------
1 | import {StyleSheet, ViewStyle} from 'react-native';
2 | import React, {useEffect} from 'react';
3 | import SwitchToggle from 'react-native-switch-toggle';
4 | import constants from '../../assets/constants';
5 | import Animated, {
6 | FadeIn,
7 | FadeOut,
8 | useSharedValue,
9 | withSpring,
10 | } from 'react-native-reanimated';
11 | const WIDTH = constants.WIDTH * 0.6705314009661835748792270531401;
12 |
13 | interface ToggleBtnProps {
14 | height?: number;
15 | width?: number;
16 | }
17 |
18 | const ToggleBtn: React.FC = ({height = 0, width = 0}) => {
19 | const [isOn, toggle] = React.useState(false);
20 | const isFullScreen = React.useMemo(() => {
21 | const tempH = height;
22 | const tempW = width;
23 |
24 | if (tempH < tempW) {
25 | const temp = height;
26 | height = width;
27 | width = temp;
28 | }
29 | return tempH < tempW;
30 | }, [height, width, isOn]);
31 | const translateValue = useSharedValue('0deg');
32 | const Toggle = React.useCallback(() => {
33 | toggle(!isOn);
34 | }, [isOn]);
35 | useEffect(() => {
36 | translateValue.value = withSpring(isFullScreen ? '0deg' : '90deg');
37 | }, [isFullScreen, isOn]);
38 |
39 | const toggleContent: ViewStyle = {
40 | width: height * (4.55 / 6),
41 | height: width * 0.35,
42 | borderRadius: 999,
43 | padding: height * (4.55 / 6) * 0.04,
44 | borderWidth: 1,
45 | borderColor: constants.colors.UNDER_LINE,
46 | };
47 | const fullScreenContent: ViewStyle = {
48 | width: height * (4.55 / 6),
49 | height: width * 0.45,
50 | borderRadius: 999,
51 | padding: height * (4.55 / 6) * 0.02,
52 | borderWidth: 1,
53 | borderColor: constants.colors.UNDER_LINE,
54 | };
55 | const circleStyle: ViewStyle = {
56 | width: isFullScreen ? width * 0.4 : width * 0.3,
57 | height: isFullScreen ? width * 0.4 : width * 0.3,
58 | borderRadius: 999,
59 | borderWidth: 1,
60 | borderColor: constants.colors.UNDER_LINE,
61 | };
62 | return (
63 |
73 |
84 |
85 | );
86 | };
87 |
88 | export default ToggleBtn;
89 |
90 | const styles = StyleSheet.create({
91 | toggleContent: {
92 | width: WIDTH * 0.6,
93 | height: WIDTH * 0.25,
94 | borderRadius: 40,
95 | padding: 3,
96 | borderWidth: 1,
97 | borderColor: constants.colors.OFF_WHITE,
98 | backgroundColor: 'grey',
99 | },
100 | circleStyle: {
101 | width: WIDTH * 0.22,
102 | height: WIDTH * 0.22,
103 | borderRadius: (WIDTH * 0.22) / 2,
104 | borderWidth: 1,
105 | borderColor: constants.colors.OFF_WHITE,
106 | },
107 | });
108 |
--------------------------------------------------------------------------------
/src/components/playGround/AaTxt.tsx:
--------------------------------------------------------------------------------
1 | import {Pressable, StyleSheet, Text, Vibration, View} from 'react-native';
2 | import React from 'react';
3 | import constants from '../../assets/constants';
4 |
5 | const green = constants.colors.GREEN;
6 | const offWhite = constants.colors.OFF_WHITE;
7 | const height = constants.HEIGHT * 0.42075892857142857142857142857143;
8 | const AaTxt = () => {
9 | const [color, setColor] = React.useState(true);
10 | const toggle = React.useCallback(() => {
11 | Vibration.vibrate(1);
12 | setColor(!color);
13 | }, [color]);
14 | return (
15 |
16 | {/*
17 |
18 | a
19 |
20 | */}
21 |
22 |
23 | a
24 |
25 |
26 |
27 | );
28 | };
29 |
30 | export default AaTxt;
31 |
32 | const styles = StyleSheet.create({
33 | topATxt: {
34 | fontFamily: constants.Fonts.text,
35 | color: constants.colors.OFF_WHITE,
36 | fontSize: constants.HEIGHT * 0.16,
37 | lineHeight: constants.HEIGHT * 0.16,
38 | paddingBottom: constants.HEIGHT * 0.01,
39 | textAlignVertical: 'center',
40 | },
41 | bottomATxt: {
42 | fontFamily: constants.Fonts.text,
43 | color: constants.colors.GREEN,
44 | fontSize: constants.HEIGHT * 0.12,
45 | lineHeight: constants.HEIGHT * 0.12,
46 | paddingBottom: constants.HEIGHT * 0.01,
47 | textAlign: 'center',
48 | },
49 | fullSizeAndCenter: {
50 | height: height,
51 | width: '100%',
52 | alignItems: 'center',
53 | justifyContent: 'center',
54 | },
55 | center: {
56 | justifyContent: 'center',
57 | alignSelf: 'center',
58 | },
59 | });
60 |
--------------------------------------------------------------------------------
/src/components/playGround/SliderPlay.tsx:
--------------------------------------------------------------------------------
1 | import {StyleSheet, Text, Vibration, View} from 'react-native';
2 | import React from 'react';
3 | import constants from '../../assets/constants';
4 | import Animated, {
5 | ZoomIn,
6 | runOnJS,
7 | useSharedValue,
8 | withSpring,
9 | } from 'react-native-reanimated';
10 | import {Gesture, GestureDetector} from 'react-native-gesture-handler';
11 |
12 | interface Props {
13 | sliderHeight: number;
14 | sliderWidth: number;
15 | }
16 | const SliderPlay: React.FC = ({sliderHeight, sliderWidth}) => {
17 | const x = useSharedValue(0);
18 | const prevX = useSharedValue(0);
19 | const followX = useSharedValue(0);
20 | const tintWidth = React.useMemo(() => sliderWidth * 0.55, []);
21 | const vibrate = React.useCallback(() => {
22 | Vibration.vibrate(1);
23 | }, []);
24 | const gesture = React.useMemo(
25 | () =>
26 | Gesture.Pan()
27 | .onStart(() => (prevX.value = x.value))
28 | .onChange(e => {
29 | if (e.translationX + prevX.value + tintWidth > sliderWidth) {
30 | x.value = withSpring(sliderWidth - tintWidth);
31 | if (followX.value !== sliderWidth - tintWidth) {
32 | followX.value = sliderWidth - tintWidth;
33 | runOnJS(vibrate)();
34 | }
35 | } else if (e.translationX + prevX.value < 0) {
36 | x.value = withSpring(0);
37 | if (followX.value !== 0) {
38 | followX.value = 0;
39 | runOnJS(vibrate)();
40 | }
41 | } else {
42 | followX.value = prevX.value + e.translationX;
43 | x.value = withSpring(prevX.value + e.translationX);
44 | }
45 | }),
46 | [],
47 | );
48 | return (
49 |
51 |
52 |
56 |
57 |
58 | );
59 | };
60 |
61 | export default SliderPlay;
62 |
63 | const styles = StyleSheet.create({
64 | container: {
65 | borderColor: constants.colors.OFF_WHITE,
66 | borderWidth: 1,
67 | width: '60%',
68 | height: '40%',
69 | borderTopLeftRadius: 25,
70 | borderBottomLeftRadius: 25,
71 | borderTopRightRadius: 25,
72 | borderBottomRightRadius: 25,
73 | },
74 | tint: {
75 | backgroundColor: constants.colors.GREEN,
76 | height: '100%',
77 | borderTopLeftRadius: 25,
78 | borderBottomLeftRadius: 25,
79 | borderTopRightRadius: 25,
80 | borderBottomRightRadius: 25,
81 | width: '55%',
82 | },
83 | });
84 |
--------------------------------------------------------------------------------
/src/components/playGround/TenCircles.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | Pressable,
3 | StyleSheet,
4 | Text,
5 | TouchableOpacity,
6 | Vibration,
7 | View,
8 | } from 'react-native';
9 | import React from 'react';
10 | import CircleCheckBox from '../CircleCheckBox';
11 | import constants from '../../assets/constants';
12 | import {Gesture, GestureDetector} from 'react-native-gesture-handler';
13 | import Animated, {
14 | ZoomIn,
15 | runOnJS,
16 | useSharedValue,
17 | } from 'react-native-reanimated';
18 |
19 | interface Props {
20 | viewHeight: number;
21 | }
22 | const TenCircles: React.FC = ({viewHeight}) => {
23 | const size = React.useMemo(
24 | () => viewHeight * 0.06801416089708934270417327915453,
25 | [],
26 | );
27 | const gap = React.useMemo(
28 | () => viewHeight * 0.02441533980921155891944681815804,
29 | [],
30 | );
31 | const paddingVertical = React.useMemo(
32 | () => viewHeight * 0.04708672677490800648750457787621,
33 | [],
34 | );
35 | const [selectedIndex, setSelectedIndex] = React.useState(6);
36 | const onPress = React.useCallback((index: number) => {
37 | vibrate();
38 | setSelectedIndex(index);
39 | }, []);
40 | const vibrate = React.useCallback(() => {
41 | Vibration.vibrate(1);
42 | }, []);
43 | const prevIndex = useSharedValue(6);
44 | const currentIndex = useSharedValue(6);
45 | const circles = new Array(10).fill(0);
46 | const gesture = React.useMemo(
47 | () =>
48 | Gesture.Pan()
49 | .onTouchesDown(e => {
50 | prevIndex.value = currentIndex.value;
51 | const index = Math.floor(e.allTouches[0].y / (size + gap));
52 | currentIndex.value = index;
53 | if (currentIndex.value !== prevIndex.value) runOnJS(onPress)(index);
54 | })
55 | .onChange(e => {
56 | prevIndex.value = currentIndex.value;
57 | const index = Math.floor(e.y / (size + gap));
58 | currentIndex.value = index;
59 | if (currentIndex.value !== prevIndex.value) runOnJS(onPress)(index);
60 | })
61 | .onTouchesUp(() => {
62 | runOnJS(vibrate)();
63 | }),
64 | [],
65 | );
66 | return (
67 |
68 |
69 |
70 | {circles.map((val, index) => {
71 | return (
72 |
75 | onPress(index)}
78 | style={[
79 | {...(index !== circles.length - 1 && {marginBottom: gap})},
80 | ]}>
81 |
91 |
92 |
93 | );
94 | })}
95 |
96 |
97 |
98 | );
99 | };
100 |
101 | export default TenCircles;
102 |
103 | const styles = StyleSheet.create({
104 | container: {
105 | width: '100%',
106 | height: '100%',
107 | alignItems: 'center',
108 | },
109 | });
110 |
--------------------------------------------------------------------------------
/src/components/playGround/ToggleButton.tsx:
--------------------------------------------------------------------------------
1 | import {StyleSheet, Text, View} from 'react-native';
2 | import React from 'react';
3 | import SwitchToggle from 'react-native-switch-toggle';
4 | import constants from '../../assets/constants';
5 | const WIDTH = constants.WIDTH * 0.6705314009661835748792270531401;
6 | const ToggleButton = () => {
7 | const [isOn, toggle] = React.useState(false);
8 | const Toggle = React.useCallback(() => {
9 | toggle(!isOn);
10 | }, [isOn]);
11 | return (
12 |
23 | );
24 | };
25 |
26 | export default ToggleButton;
27 |
28 | const styles = StyleSheet.create({
29 | toggleContent: {
30 | width: WIDTH * 0.6,
31 | height: WIDTH * 0.25,
32 | borderRadius: 40,
33 | padding: 3,
34 | borderWidth: 1,
35 | borderColor: constants.colors.OFF_WHITE,
36 | },
37 | circleStyle: {
38 | width: WIDTH * 0.22,
39 | height: WIDTH * 0.22,
40 | borderRadius: (WIDTH * 0.22) / 2,
41 | borderWidth: 1,
42 | borderColor: constants.colors.OFF_WHITE,
43 | },
44 | });
45 |
--------------------------------------------------------------------------------
/src/components/search/RenderSearchElement.tsx:
--------------------------------------------------------------------------------
1 | import {StyleSheet, Text, TouchableOpacity, View} from 'react-native';
2 | import React from 'react';
3 | import Animated, {
4 | FadeInUp,
5 | FadeOutUp,
6 | SequencedTransition,
7 | } from 'react-native-reanimated';
8 | import {getTimeFromDateString} from '../WeeklyCalender';
9 | import constants from '../../assets/constants';
10 | import {ISearchElement} from './types';
11 | import {ListRenderItem} from '@shopify/flash-list';
12 | const {HEIGHT, WIDTH} = constants;
13 | const paddingVertical = HEIGHT * (45 / 896);
14 | const lineHeight = 24;
15 | const maxWidth = '45%';
16 |
17 | const options: Intl.DateTimeFormatOptions = {
18 | day: '2-digit',
19 | month: '2-digit',
20 | year: '2-digit',
21 | };
22 | const formatDate = (date: Date) =>
23 | date
24 | .toLocaleDateString('en', options)
25 | .replace(/\./g, '/')
26 | .replace(/(\d{2})(\/)(\d{2})(\/)(\d{2})/g, '$1 / $3 / $5');
27 | interface SearchElementProps {
28 | navigateByType: (index: number) => void;
29 | isMsg?: boolean;
30 | isTask?: boolean;
31 | data?: ISearchElement;
32 | }
33 |
34 | const RenderSearchElement: ListRenderItem = ({
35 | item,
36 | index,
37 | }) => {
38 | const {navigateByType, isMsg, isTask, data} = item;
39 | const {name, description} = data || {name: '', description: ''};
40 | return (
41 | navigateByType(index)}>
45 |
50 |
51 | {isMsg ? formatDate(new Date(name)) : name}
52 |
53 | {!isTask ? (
54 |
55 | {description}
56 |
57 | ) : (
58 |
59 |
60 | {formatDate(new Date(description))}
61 |
62 |
63 | {getTimeFromDateString(description, false, true)}
64 |
65 |
66 | )}
67 |
68 |
69 | );
70 | };
71 |
72 | export default RenderSearchElement;
73 |
74 | const styles = StyleSheet.create({
75 | dataName: {
76 | fontFamily: constants.Fonts.text,
77 | fontWeight: '800',
78 | color: constants.colors.OFF_WHITE,
79 | fontSize: 12,
80 | lineHeight,
81 | maxWidth,
82 | paddingLeft: 1.5,
83 | },
84 | dataDesc: {
85 | fontFamily: constants.Fonts.text,
86 | color: constants.colors.OFF_WHITE,
87 | fontSize: 12,
88 | lineHeight,
89 | maxWidth,
90 | textAlign: 'left',
91 | width: maxWidth,
92 | },
93 | taskDateContainer: {
94 | flexDirection: 'row',
95 | justifyContent: 'space-between',
96 | width: '45%',
97 | },
98 | taskDate: {
99 | fontFamily: constants.Fonts.text,
100 | color: constants.colors.OFF_WHITE,
101 | fontSize: 12,
102 | lineHeight,
103 | textAlign: 'left',
104 | },
105 | txtContainer: {
106 | flexDirection: 'row',
107 | justifyContent: 'space-between',
108 | alignItems: 'center',
109 | },
110 | });
111 |
--------------------------------------------------------------------------------
/src/components/search/types.ts:
--------------------------------------------------------------------------------
1 | import {TaskType} from '../../app/Reducers/User/userSlice';
2 | import {ListType} from '../../assets/constants';
3 |
4 | export interface ISearchElement {
5 | name: string;
6 | description: string;
7 | }
8 | export interface ISearchElementProps {
9 | id?: string;
10 | title?: string;
11 | items?: IListSearchResult[] | ITaskSearchResult[] | IMessageSearchResult[];
12 | navigateTo?: (id: string) => void;
13 | setSelectedTask?: React.Dispatch<
14 | React.SetStateAction
15 | >;
16 | flashListHeight?: number;
17 | openTaskModal?: () => void;
18 | }
19 | export interface ISearchResult {
20 | lists: IListSearchResult[];
21 | tasks: ITaskSearchResult[];
22 | messages: IMessageSearchResult[];
23 | }
24 |
25 | export interface ITaskSearchResult extends TaskType {
26 | data: ISearchElement;
27 | }
28 | export interface IListSearchResult extends ListType {
29 | data: ISearchElement;
30 | }
31 | export interface IMessageSearchResult extends IMessageValues {
32 | data: ISearchElement;
33 | }
34 |
--------------------------------------------------------------------------------
/src/hooks/notification/types.ts:
--------------------------------------------------------------------------------
1 | import {EventType, EventDetail} from '@notifee/react-native';
2 |
3 | export const ACTION = {
4 | DISMISS: 'dismiss',
5 | DONE: 'done',
6 | } as const;
7 |
8 | export interface INotifeeHandler {
9 | type: EventType;
10 | detail: EventDetail;
11 | }
12 |
--------------------------------------------------------------------------------
/src/hooks/notification/useFcmTokenRefresh.tsx:
--------------------------------------------------------------------------------
1 | import messaging from '@react-native-firebase/messaging';
2 | import {useEffect} from 'react';
3 | import {userApi} from '../../app/api/userApi';
4 | import {store} from '../../app/store';
5 | import {setFcm} from '../../app/Reducers/User/userSlice';
6 |
7 | const useFcmTokenRefresh = () => {
8 | const isSignIn = store.getState().reducer.user.isSignIn;
9 |
10 | const listenToFCMTokenRefresh = () => {
11 | messaging().onTokenRefresh(async newToken => {
12 | console.log('@@@@@refresh fcm token work!@!@!@');
13 | const oldToken = store.getState().reducer.user.fcmToken;
14 | await store.dispatch(
15 | userApi.endpoints?.refreshFcmToken?.initiate({newToken, oldToken}),
16 | );
17 | });
18 | };
19 |
20 | const getFCMToken = async () => {
21 | const oldToken = store.getState().reducer.user.fcmToken;
22 | if (oldToken) return;
23 | messaging()
24 | .getToken()
25 | .then(async token => {
26 | await store.dispatch(userApi.endpoints?.setFcmToken?.initiate(token));
27 | store.dispatch(setFcm(token));
28 | })
29 | .catch(err => {
30 | console.log('Unable to retrieve token', err);
31 | });
32 | };
33 |
34 | useEffect(() => {
35 | if (!isSignIn) return;
36 | getFCMToken();
37 | listenToFCMTokenRefresh();
38 | }, [isSignIn]);
39 | };
40 |
41 | export default useFcmTokenRefresh;
42 |
--------------------------------------------------------------------------------
/src/hooks/notification/useNotification.tsx:
--------------------------------------------------------------------------------
1 | import {useEffect} from 'react';
2 | import messaging from '@react-native-firebase/messaging';
3 | import notifee, {
4 | AndroidImportance,
5 | AuthorizationStatus,
6 | } from '@notifee/react-native';
7 | import useFcmTokenRefresh from './useFcmTokenRefresh';
8 | import {handleNotification, onDisplayNotification} from './utils';
9 |
10 | const useNotification = () => {
11 | useFcmTokenRefresh();
12 | useEffect(() => {
13 | createChannel();
14 | const unsubscribe = messaging().onMessage(onDisplayNotification);
15 | handleNotificationFromForegroundState();
16 | return () => {
17 | unsubscribe?.();
18 | };
19 | }, []);
20 |
21 | const createChannel = async () => {
22 | const isHasPermission = await requestPushNotificationsPermission();
23 | if (!isHasPermission) return;
24 |
25 | await notifee.createChannel({
26 | id: 'Here - default',
27 | name: 'Here - default',
28 | importance: AndroidImportance.HIGH,
29 | });
30 | };
31 | const hasPermission = async () => {
32 | return await messaging().hasPermission();
33 | };
34 | const handleNotificationFromForegroundState = () => {
35 | notifee.onForegroundEvent(handleNotification);
36 | };
37 | const requestPushNotificationsPermission = async () => {
38 | const isHasPermission =
39 | (await hasPermission()) === messaging.AuthorizationStatus.AUTHORIZED;
40 | if (isHasPermission) return true;
41 | const setting = await notifee.requestPermission();
42 | if (
43 | setting.authorizationStatus === AuthorizationStatus.AUTHORIZED ||
44 | setting.authorizationStatus === AuthorizationStatus.PROVISIONAL
45 | ) {
46 | return true;
47 | }
48 |
49 | const authStatus = await messaging().requestPermission();
50 | const enabled =
51 | authStatus === messaging.AuthorizationStatus.AUTHORIZED ||
52 | authStatus === messaging.AuthorizationStatus.PROVISIONAL;
53 |
54 | console.log('Authorization status:', authStatus);
55 | return enabled;
56 | };
57 | };
58 |
59 | export default useNotification;
60 |
--------------------------------------------------------------------------------
/src/hooks/notification/utils.ts:
--------------------------------------------------------------------------------
1 | import notifee, {
2 | AndroidImportance,
3 | EventDetail,
4 | EventType,
5 | } from '@notifee/react-native';
6 | import {ACTION, INotifeeHandler} from './types';
7 | import {tasksApi} from '../../app/api/taskApi';
8 | import {store} from '../../app/store';
9 |
10 | export const handleNotification = async ({type, detail}: INotifeeHandler) => {
11 | switch (type) {
12 | case EventType.DISMISSED:
13 | console.log('dismiss notification');
14 | break;
15 | case EventType.ACTION_PRESS:
16 | handleActionPress(detail.pressAction?.id, detail);
17 | break;
18 | }
19 | };
20 |
21 | const handleActionPress = async (action?: string, detail?: EventDetail) => {
22 | const _id = detail?.notification?.data?.taskId;
23 | switch (action) {
24 | case ACTION.DONE:
25 | await store.dispatch(
26 | tasksApi.endpoints?.addOrEditTask?.initiate({_id, done: true}),
27 | );
28 | break;
29 | case ACTION.DISMISS:
30 | await store.dispatch(
31 | tasksApi.endpoints?.addOrEditTask?.initiate({_id, notified: true}),
32 | );
33 |
34 | break;
35 | }
36 | };
37 |
38 | export const onDisplayNotification = async (remoteMessage: any) => {
39 | await notifee.displayNotification({
40 | title: remoteMessage.data?.title,
41 | body: remoteMessage.data?.body,
42 | data: remoteMessage.data,
43 | android: {
44 | channelId: 'Here - default',
45 | importance: AndroidImportance.HIGH,
46 | smallIcon: 'ic_launcher', // optional, defaults to 'ic_launcher'.
47 |
48 | actions: [
49 | {
50 | title: 'did it!',
51 | pressAction: {id: 'done'},
52 | },
53 | {
54 | title: 'not today',
55 | pressAction: {id: 'dismiss'},
56 | },
57 | {
58 | title: 'remind me later',
59 | pressAction: {id: 'remind me later'},
60 | },
61 | ],
62 | },
63 | });
64 | };
65 |
--------------------------------------------------------------------------------
/src/screens/Auth.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | SafeAreaView,
3 | ScrollView,
4 | StatusBar,
5 | StyleSheet,
6 | Text,
7 | View,
8 | } from 'react-native';
9 | import React from 'react';
10 | import SVG from './../assets/svg';
11 | import constants from '../assets/constants';
12 | import {Dimensions} from 'react-native';
13 | import AuthModal from './AuthModal';
14 |
15 | export default function Auth() {
16 | return (
17 |
18 |
19 | {/*
25 | HERE
26 | */}
27 |
28 |
29 |
30 |
31 | );
32 | }
33 |
34 | const styles = StyleSheet.create({
35 | container: {
36 | flex: 1,
37 | height: '100%',
38 | alignItems: 'center',
39 | backgroundColor: constants.colors.BGC,
40 | },
41 | topSection: {
42 | // marginRight: WIDTH / 10,
43 | flex: 1,
44 | width: '100%',
45 | alignItems: 'center',
46 | justifyContent: 'center',
47 | // backgroundColor: constants.colors.BLACK,
48 | },
49 | Logo: {
50 | // height: '100%',
51 | // width: '5000%',
52 | // flex: 1,
53 | fontFamily: constants.Fonts.text,
54 | // fontSize: 55,
55 | color: constants.colors.OFF_WHITE,
56 | textAlign: 'center',
57 | textAlignVertical: 'center',
58 | backgroundColor: 'black',
59 | },
60 | });
61 |
--------------------------------------------------------------------------------
/src/screens/list/NewListCategory.tsx:
--------------------------------------------------------------------------------
1 | import {Keyboard, StyleSheet, Text, TextInput, View} from 'react-native';
2 | import React, {memo, useCallback, useEffect, useRef} from 'react';
3 | import constants from '../../assets/constants';
4 | import MyListsWrapper from './MyListsWrapper';
5 | import {useAddCategoryMutation} from '../../app/api/listApi';
6 | import {useNavigation} from '@react-navigation/native';
7 |
8 | const NewListCategory = () => {
9 | const [AddCategory, {isLoading, error, isSuccess}] = useAddCategoryMutation();
10 | const navigation = useNavigation();
11 | const textInputRef = useRef(null);
12 | const InputRef = useRef('');
13 | const onPress = () => {
14 | console.log(InputRef.current);
15 | };
16 | const AddNewCategory = useCallback(() => {
17 | AddCategory({name: InputRef.current}).then(value => {
18 | navigation.goBack();
19 | });
20 | }, []);
21 |
22 | const onChangeText = (text: string) => {
23 | InputRef.current = text;
24 | };
25 | const onKeyboardDismiss = () => {
26 | textInputRef.current?.blur();
27 | };
28 | useEffect(() => {
29 | Keyboard.addListener('keyboardDidHide', onKeyboardDismiss);
30 | }, []);
31 | return (
32 |
37 |
47 |
48 | );
49 | };
50 |
51 | export default memo(NewListCategory);
52 |
53 | const styles = StyleSheet.create({
54 | newTaskTitleInput: {
55 | // borderWidth: 1,
56 | // borderColor: 'black',
57 | height: '100%',
58 |
59 | fontSize: 20,
60 | color: constants.colors.UNDER_LINE,
61 | alignItems: 'center',
62 | textAlignVertical: 'top',
63 | fontFamily: constants.Fonts.text,
64 | },
65 | });
66 |
--------------------------------------------------------------------------------
/src/screens/list/NewListTitle.tsx:
--------------------------------------------------------------------------------
1 | import {Keyboard, StyleSheet, Text, TextInput, View} from 'react-native';
2 | import React, {memo, useCallback, useEffect, useRef} from 'react';
3 | import constants from '../../assets/constants';
4 | import MyListsWrapper from './MyListsWrapper';
5 | import {useAddListTitleMutation} from '../../app/api/listApi';
6 | import {RouteProp, useNavigation, useRoute} from '@react-navigation/native';
7 | type RootStackParamList = {
8 | MyLists: {id: string};
9 | };
10 | type MyListsRouteProp = RouteProp;
11 | const NewListTitle = () => {
12 | const id = useRoute().params.id;
13 | const [AddListTitle, {isLoading, error, isSuccess}] =
14 | useAddListTitleMutation();
15 | const navigation = useNavigation();
16 | const textInputRef = useRef(null);
17 | const InputRef = useRef('');
18 | const onPress = () => {
19 | console.log(InputRef.current);
20 | };
21 |
22 | const AddNewListTitle = useCallback(() => {
23 | AddListTitle({title: InputRef.current, id}).then(value => {
24 | navigation.goBack();
25 | });
26 | }, [id]);
27 |
28 | const onChangeText = (text: string) => {
29 | InputRef.current = text;
30 | };
31 | const onKeyboardDismiss = () => {
32 | textInputRef.current?.blur();
33 | };
34 | useEffect(() => {
35 | Keyboard.addListener('keyboardDidHide', onKeyboardDismiss);
36 | }, []);
37 | return (
38 |
42 |
52 |
53 | );
54 | };
55 |
56 | export default memo(NewListTitle);
57 |
58 | const styles = StyleSheet.create({
59 | newTaskTitleInput: {
60 | borderWidth: 0,
61 | fontSize: 20,
62 | height: '100%',
63 | color: constants.colors.UNDER_LINE,
64 | alignItems: 'center',
65 | textAlignVertical: 'top',
66 | fontFamily: constants.Fonts.text,
67 | },
68 | });
69 |
--------------------------------------------------------------------------------
/src/screens/message/types.ts:
--------------------------------------------------------------------------------
1 | interface IMessagesProps {
2 | message?: IMessageValues;
3 | }
4 | interface IMessageValues {
5 | _id?: string;
6 | title: string;
7 | message: string;
8 | date?: Date;
9 | createdAt?: string;
10 | }
11 |
--------------------------------------------------------------------------------
/src/screens/selectWidgets/SelectWidgetsTitle.tsx:
--------------------------------------------------------------------------------
1 | import {StyleSheet, Text, View} from 'react-native';
2 | import React from 'react';
3 | import constants from '../../assets/constants';
4 | import Animated, {FadeInLeft} from 'react-native-reanimated';
5 | import Line from '../../components/Line';
6 | const {Fonts, HEIGHT, WIDTH, rf, colors} = constants;
7 |
8 | const SelectWidgetsTitle = () => {
9 | return (
10 |
13 |
17 | Select up to
18 |
19 |
23 | two widgets that
24 |
25 |
26 | helps you in your
27 |
28 |
32 |
35 | home page
36 |
37 |
38 |
43 |
44 |
45 |
46 | );
47 | };
48 |
49 | export default SelectWidgetsTitle;
50 |
51 | const styles = StyleSheet.create({
52 | topContainer: {
53 | height: '23.7723%',
54 | width: '89%',
55 | // marginBottom: '7%',
56 | },
57 | paragraphTxt: {
58 | fontFamily: Fonts.paragraph,
59 | fontSize: 32,
60 | lineHeight: 28,
61 | color: colors.OFF_WHITE,
62 | },
63 | highLightTxt: {
64 | color: colors.GREEN,
65 | },
66 | });
67 |
--------------------------------------------------------------------------------
/src/screens/selectWidgets/types.ts:
--------------------------------------------------------------------------------
1 | import {ViewStyle} from 'react-native';
2 | import {SvgProps} from 'react-native-svg';
3 |
4 | export interface ISvgElement {
5 | height: number;
6 | width: number;
7 | Svg: React.FC;
8 | content: string;
9 | title: string;
10 | style?: ViewStyle;
11 | }
12 |
13 | export type WidgetsType =
14 | | 'PlayGround | pizza'
15 | | 'PlayGround | toggle'
16 | | 'Im not stupid'
17 | | 'Next task'
18 | | 'Last message';
19 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | // prettier-ignore
2 | {
3 | "extends": "@tsconfig/react-native/tsconfig.json", /* Recommended React Native TSConfig base */
4 | "compilerOptions": {
5 | /* Visit https://aka.ms/tsconfig.json to read more about this file */
6 |
7 | /* Completeness */
8 | "skipLibCheck": true,
9 | "typeRoots": [
10 | "src/@types",
11 | ], /* Skip type checking all .d.ts files. */
12 | }
13 | }
14 |
--------------------------------------------------------------------------------