From 3cf37faff4374a507e41c838a2a657b2cb1ee010 Mon Sep 17 00:00:00 2001 From: Jaanu423 Date: Wed, 10 Sep 2025 16:30:28 +0530 Subject: [PATCH 1/2] profilr --- package-lock.json | 392 +++++++++++++++++++++++++++++++++++++++++++++- package.json | 7 +- 2 files changed, 390 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0876147..5a83c18 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,9 +8,12 @@ "name": "CircleCollect", "version": "0.0.1", "dependencies": { + "@react-native-vector-icons/ionicons": "^12.3.0", "@react-native/new-app-screen": "0.81.1", "react": "19.1.0", "react-native": "0.81.1", + "react-native-elements": "^3.4.3", + "react-native-image-picker": "^8.2.1", "react-native-safe-area-context": "^5.5.2" }, "devDependencies": { @@ -2914,6 +2917,132 @@ "node": ">=10" } }, + "node_modules/@react-native-vector-icons/common": { + "version": "12.3.0", + "resolved": "https://registry.npmjs.org/@react-native-vector-icons/common/-/common-12.3.0.tgz", + "integrity": "sha512-5GMBcLBkA0MuciweYcrSyvi9fYGanfVnE2J+pwHx1QiaVgTaoCm4rylJgSS77MVI5qUiGh7aJpqq5afSz2U4bw==", + "license": "MIT", + "dependencies": { + "find-up": "^7.0.0", + "picocolors": "^1.1.1", + "plist": "^3.1.0" + }, + "bin": { + "rnvi-update-plist": "lib/commonjs/scripts/updatePlist.js" + }, + "engines": { + "node": ">= 18.0.0" + }, + "peerDependencies": { + "@react-native-vector-icons/get-image": "^12.2.0", + "react": "*", + "react-native": "*" + }, + "peerDependenciesMeta": { + "@react-native-vector-icons/get-image": { + "optional": true + } + } + }, + "node_modules/@react-native-vector-icons/common/node_modules/find-up": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-7.0.0.tgz", + "integrity": "sha512-YyZM99iHrqLKjmt4LJDj58KI+fYyufRLBSYcqycxf//KpBk9FoewoGX0450m9nB44qrZnovzC2oeP5hUibxc/g==", + "license": "MIT", + "dependencies": { + "locate-path": "^7.2.0", + "path-exists": "^5.0.0", + "unicorn-magic": "^0.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@react-native-vector-icons/common/node_modules/locate-path": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz", + "integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==", + "license": "MIT", + "dependencies": { + "p-locate": "^6.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@react-native-vector-icons/common/node_modules/p-limit": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", + "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", + "license": "MIT", + "dependencies": { + "yocto-queue": "^1.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@react-native-vector-icons/common/node_modules/p-locate": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz", + "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==", + "license": "MIT", + "dependencies": { + "p-limit": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@react-native-vector-icons/common/node_modules/path-exists": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", + "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/@react-native-vector-icons/common/node_modules/yocto-queue": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.1.tgz", + "integrity": "sha512-AyeEbWOu/TAXdxlV9wmGcR0+yh2j3vYPGOECcIj2S7MkrLyC7ne+oye2BKTItt0ii2PHk4cDy+95+LshzbXnGg==", + "license": "MIT", + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@react-native-vector-icons/ionicons": { + "version": "12.3.0", + "resolved": "https://registry.npmjs.org/@react-native-vector-icons/ionicons/-/ionicons-12.3.0.tgz", + "integrity": "sha512-H/rlYzUEm0hhwwca2k6VMNjy0rLcjan6iwyaYDXMhsJQl7O4+Qkm7uVd/KEreS5gXfGuntUlcSa9GSn+dYqnjA==", + "license": "MIT", + "dependencies": { + "@react-native-vector-icons/common": "^12.3.0" + }, + "engines": { + "node": ">= 18.0.0" + }, + "peerDependencies": { + "react": "*", + "react-native": "*" + } + }, "node_modules/@react-native/assets-registry": { "version": "0.81.1", "resolved": "https://registry.npmjs.org/@react-native/assets-registry/-/assets-registry-0.81.1.tgz", @@ -3418,12 +3547,30 @@ "version": "19.1.12", "resolved": "https://registry.npmjs.org/@types/react/-/react-19.1.12.tgz", "integrity": "sha512-cMoR+FoAf/Jyq6+Df2/Z41jISvGZZ2eTlnsaJRptmZ76Caldwy1odD4xTr/gNV9VLj0AWgg/nmkevIyUfIIq5w==", - "devOptional": true, "license": "MIT", "dependencies": { "csstype": "^3.0.2" } }, + "node_modules/@types/react-native": { + "version": "0.70.19", + "resolved": "https://registry.npmjs.org/@types/react-native/-/react-native-0.70.19.tgz", + "integrity": "sha512-c6WbyCgWTBgKKMESj/8b4w+zWcZSsCforson7UdXtXMecG3MxCinYi6ihhrHVPyUrVzORsvEzK8zg32z4pK6Sg==", + "license": "MIT", + "dependencies": { + "@types/react": "*" + } + }, + "node_modules/@types/react-native-vector-icons": { + "version": "6.4.18", + "resolved": "https://registry.npmjs.org/@types/react-native-vector-icons/-/react-native-vector-icons-6.4.18.tgz", + "integrity": "sha512-YGlNWb+k5laTBHd7+uZowB9DpIK3SXUneZqAiKQaj1jnJCZM0x71GDim5JCTMi4IFkhc9m8H/Gm28T5BjyivUw==", + "license": "MIT", + "dependencies": { + "@types/react": "*", + "@types/react-native": "^0.70" + } + }, "node_modules/@types/react-test-renderer": { "version": "19.1.0", "resolved": "https://registry.npmjs.org/@types/react-test-renderer/-/react-test-renderer-19.1.0.tgz", @@ -3695,6 +3842,15 @@ "devOptional": true, "license": "MIT" }, + "node_modules/@xmldom/xmldom": { + "version": "0.8.11", + "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.11.tgz", + "integrity": "sha512-cQzWCtO6C8TQiYl1ruKNn2U6Ao4o4WBBcbL61yJl84x+j5sOWWFU9X7DpND8XZG3daDppSsigMdfAIl2upQBRw==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/abort-controller": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", @@ -4743,6 +4899,16 @@ "dev": true, "license": "MIT" }, + "node_modules/color": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz", + "integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==", + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.3", + "color-string": "^1.6.0" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -4761,6 +4927,31 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "license": "MIT" }, + "node_modules/color-string": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", + "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", + "license": "MIT", + "dependencies": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "node_modules/color/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "license": "MIT" + }, "node_modules/colorette": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", @@ -4968,7 +5159,6 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", - "devOptional": true, "license": "MIT" }, "node_modules/data-view-buffer": { @@ -5085,7 +5275,6 @@ "version": "4.3.1", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", - "devOptional": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -6812,6 +7001,21 @@ "hermes-estree": "0.29.1" } }, + "node_modules/hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "license": "BSD-3-Clause", + "dependencies": { + "react-is": "^16.7.0" + } + }, + "node_modules/hoist-non-react-statics/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "license": "MIT" + }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -8438,7 +8642,6 @@ "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true, "license": "MIT" }, "node_modules/lodash.debounce": { @@ -8448,6 +8651,13 @@ "devOptional": true, "license": "MIT" }, + "node_modules/lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==", + "deprecated": "This package is deprecated. Use require('node:util').isDeepStrictEqual instead.", + "license": "MIT" + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -9320,7 +9530,6 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -9484,6 +9693,15 @@ "node": ">=8" } }, + "node_modules/opencollective-postinstall": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz", + "integrity": "sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==", + "license": "MIT", + "bin": { + "opencollective-postinstall": "index.js" + } + }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -9767,6 +9985,20 @@ "node": ">=8" } }, + "node_modules/plist": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/plist/-/plist-3.1.0.tgz", + "integrity": "sha512-uysumyrvkUX0rX/dEVqt8gC3sTBzd4zoWfLeS29nb53imdaXVvLINYXTI2GNqzaMuvacNx4uJQ8+b3zXR0pkgQ==", + "license": "MIT", + "dependencies": { + "@xmldom/xmldom": "^0.8.8", + "base64-js": "^1.5.1", + "xmlbuilder": "^15.1.1" + }, + "engines": { + "node": ">=10.4.0" + } + }, "node_modules/possible-typed-array-names": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", @@ -9856,7 +10088,6 @@ "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dev": true, "license": "MIT", "dependencies": { "loose-envify": "^1.4.0", @@ -9868,7 +10099,6 @@ "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true, "license": "MIT" }, "node_modules/punycode": { @@ -10072,6 +10302,50 @@ } } }, + "node_modules/react-native-elements": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/react-native-elements/-/react-native-elements-3.4.3.tgz", + "integrity": "sha512-VtZc25EecPZyUBER85zFK9ZbY6kkUdcm1ZwJ9hdoGSCr1R/GFgxor4jngOcSYeMvQ+qimd5No44OVJW3rSJECA==", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "@types/react-native-vector-icons": "^6.4.6", + "color": "^3.1.2", + "deepmerge": "^4.2.2", + "hoist-non-react-statics": "^3.3.2", + "lodash.isequal": "^4.5.0", + "opencollective-postinstall": "^2.0.3", + "react-native-ratings": "8.0.4", + "react-native-size-matters": "^0.3.1" + }, + "peerDependencies": { + "react-native-safe-area-context": ">= 3.0.0", + "react-native-vector-icons": ">7.0.0" + } + }, + "node_modules/react-native-image-picker": { + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/react-native-image-picker/-/react-native-image-picker-8.2.1.tgz", + "integrity": "sha512-FBeGYJGFDjMdGCcyubDJgBAPCQ4L1D3hwLXyUU91jY9ahOZMTbluceVvRmrEKqnDPFJ0gF1NVhJ0nr1nROFLdg==", + "license": "MIT", + "peerDependencies": { + "react": "*", + "react-native": "*" + } + }, + "node_modules/react-native-ratings": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/react-native-ratings/-/react-native-ratings-8.0.4.tgz", + "integrity": "sha512-Xczu5lskIIRD6BEdz9A0jDRpEck/SFxRqiglkXi0u67yAtI1/pcJC76P4MukCbT8K4BPVl+42w83YqXBoBRl7A==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.15" + }, + "peerDependencies": { + "react": "*", + "react-native": "*" + } + }, "node_modules/react-native-safe-area-context": { "version": "5.6.1", "resolved": "https://registry.npmjs.org/react-native-safe-area-context/-/react-native-safe-area-context-5.6.1.tgz", @@ -10082,6 +10356,74 @@ "react-native": "*" } }, + "node_modules/react-native-size-matters": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/react-native-size-matters/-/react-native-size-matters-0.3.1.tgz", + "integrity": "sha512-mKOfBLIBFBcs9br1rlZDvxD5+mAl8Gfr5CounwJtxI6Z82rGrMO+Kgl9EIg3RMVf3G855a85YVqHJL2f5EDRlw==", + "license": "MIT", + "peerDependencies": { + "react-native": "*" + } + }, + "node_modules/react-native-vector-icons": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/react-native-vector-icons/-/react-native-vector-icons-10.3.0.tgz", + "integrity": "sha512-IFQ0RE57819hOUdFvgK4FowM5aMXg7C7XKsuGLevqXkkIJatc3QopN0wYrb2IrzUgmdpfP+QVIbI3S6h7M0btw==", + "deprecated": "react-native-vector-icons package has moved to a new model of per-icon-family packages. See the https://github.com/oblador/react-native-vector-icons/blob/master/MIGRATION.md on how to migrate", + "license": "MIT", + "peer": true, + "dependencies": { + "prop-types": "^15.7.2", + "yargs": "^16.1.1" + }, + "bin": { + "fa-upgrade.sh": "bin/fa-upgrade.sh", + "fa5-upgrade": "bin/fa5-upgrade.sh", + "fa6-upgrade": "bin/fa6-upgrade.sh", + "generate-icon": "bin/generate-icon.js" + } + }, + "node_modules/react-native-vector-icons/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "license": "ISC", + "peer": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/react-native-vector-icons/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "license": "MIT", + "peer": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/react-native-vector-icons/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "license": "ISC", + "peer": true, + "engines": { + "node": ">=10" + } + }, "node_modules/react-native/node_modules/commander": { "version": "12.1.0", "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", @@ -10784,6 +11126,21 @@ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "license": "ISC" }, + "node_modules/simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.3.1" + } + }, + "node_modules/simple-swizzle/node_modules/is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", + "license": "MIT" + }, "node_modules/sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", @@ -11533,6 +11890,18 @@ "node": ">=4" } }, + "node_modules/unicorn-magic": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.1.0.tgz", + "integrity": "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -11831,6 +12200,15 @@ "async-limiter": "~1.0.0" } }, + "node_modules/xmlbuilder": { + "version": "15.1.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz", + "integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==", + "license": "MIT", + "engines": { + "node": ">=8.0" + } + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", diff --git a/package.json b/package.json index 7aa409d..aba02c4 100644 --- a/package.json +++ b/package.json @@ -10,9 +10,12 @@ "test": "jest" }, "dependencies": { + "@react-native-vector-icons/ionicons": "^12.3.0", + "@react-native/new-app-screen": "0.81.1", "react": "19.1.0", "react-native": "0.81.1", - "@react-native/new-app-screen": "0.81.1", + "react-native-elements": "^3.4.3", + "react-native-image-picker": "^8.2.1", "react-native-safe-area-context": "^5.5.2" }, "devDependencies": { @@ -38,4 +41,4 @@ "engines": { "node": ">=20" } -} \ No newline at end of file +} From 737c3a486eb65ba03d58f13241bc08435c09b486 Mon Sep 17 00:00:00 2001 From: Jaanu423 Date: Mon, 15 Sep 2025 11:18:39 +0530 Subject: [PATCH 2/2] update login and verify otp --- src/screens/LoginScreen.tsx | 23 +- src/screens/OtpVarificationScreen.tsx | 17 +- src/screens/profile/Profile.tsx | 682 ++++++++++++++++++++------ src/utils/ApiUrls.tsx | 2 +- 4 files changed, 545 insertions(+), 179 deletions(-) diff --git a/src/screens/LoginScreen.tsx b/src/screens/LoginScreen.tsx index baab763..048ca04 100644 --- a/src/screens/LoginScreen.tsx +++ b/src/screens/LoginScreen.tsx @@ -27,9 +27,10 @@ const theme = { }; export default function LoginScreen() { + + const navigation = useNavigation>(); const [mobile, setMobile] = useState(""); - const navigation = useNavigation>(); - + const [loading, setLoading] = useState(false); // animations const fade = useRef(new Animated.Value(0)).current; @@ -43,17 +44,21 @@ export default function LoginScreen() { ]).start(); }, []); - const handleContinue = async () => { + const handleContinue = async () => { if (mobile.length === 10) { - console.log("Mobile submitted:", mobile); + setLoading(true); try { - const res = await axios.get(LOGIN_URL+mobile) - console.log('loginres',res.data) - if(res.data.statusCode === 200){ - navigation.navigate('OtpVarify', { mobile: mobile }) + console.log("Mobile submitted:", mobile); + const res = await axios.get(LOGIN_URL + mobile) + console.log('loginres', res.data) + if (res.data.statusCode === 200) { + navigation.navigate('OtpVarify', { mobile: mobile }) } } catch (error) { - + console.error("Login error:", error); + Alert.alert("Error", "Failed to send OTP. Please try again."); + }finally { + setLoading(false); } } else { Alert.alert("Please enter a valid 10-digit mobile number"); diff --git a/src/screens/OtpVarificationScreen.tsx b/src/screens/OtpVarificationScreen.tsx index 83bca20..994433b 100644 --- a/src/screens/OtpVarificationScreen.tsx +++ b/src/screens/OtpVarificationScreen.tsx @@ -14,10 +14,11 @@ import { KeyboardAvoidingView, StatusBar, Alert, + ToastAndroid, } from "react-native"; import { RootStackParamList } from "../navigation/AppNavigator"; import * as Keychain from "react-native-keychain"; -import { LOGIN_URL } from "../utils/ApiUrls"; +import { base_URL, LOGIN_URL } from "../utils/ApiUrls"; import { StackNavigationProp } from "@react-navigation/stack"; const theme = { @@ -76,7 +77,7 @@ export default function OtpVerificationScreen() { try { const payload = { mobile, otp }; const res = await axios.post( - "https://exotic-humpback-mistakenly.ngrok-free.app/api/user/otp/verify", + `${base_URL}user/otp/verify`, payload, { headers: { "Content-Type": "application/json", Accept: "*/*" } } ); @@ -85,11 +86,10 @@ export default function OtpVerificationScreen() { if (res.data.statusCode === 200) { saveToken(res.data.data); navigation.navigate('Home') - - } + ToastAndroid.show("OTP Verified Successfully!", ToastAndroid.SHORT);} } catch (err: any) { console.error("❌ OTP Verification Error:", err?.response?.data || err.message); - Alert.alert("Error", "Failed to verify OTP. Please try again."); + ToastAndroid.show(err.message || "Invalid OTP. Please try again.", ToastAndroid.SHORT); } }; @@ -104,11 +104,12 @@ export default function OtpVerificationScreen() { ); console.log("📩 OTP Resent:", res.data); - - Alert.alert("OTP Sent", "A new OTP has been sent to your mobile."); + setCode(Array(CELL_COUNT).fill("")); + inputs.current[0]?.focus(); + ToastAndroid.show("OTP Sent", ToastAndroid.SHORT); } catch (err: any) { console.error("❌ Resend OTP Error:", err?.response?.data || err.message); - Alert.alert("Error", "Failed to resend OTP. Try again later."); + ToastAndroid.show("Failed to resend OTP. Try again later.", ToastAndroid.SHORT); } finally { setIsResending(false); } diff --git a/src/screens/profile/Profile.tsx b/src/screens/profile/Profile.tsx index 790a7b6..f04da5b 100644 --- a/src/screens/profile/Profile.tsx +++ b/src/screens/profile/Profile.tsx @@ -7,16 +7,116 @@ import { Image, TouchableOpacity, Alert, - TextInput, ActivityIndicator, + StatusBar, + TextInput, } from "react-native"; import * as Keychain from "react-native-keychain"; -import Ionicons from "react-native-vector-icons/Ionicons"; +import {Ionicons} from "@react-native-vector-icons/ionicons"; import { launchImageLibrary } from "react-native-image-picker"; -import { CustomButton, CustomInput } from "../../common/Custom"; +import { IconProps } from "react-native-elements"; +import { base_URL } from "../../utils/ApiUrls"; -// ✅ Reusable Custom Input +type CustomButtonProps = { + title: string; + onPress: () => void; + type?: "primary" | "secondary" | "danger" | "outline"; + icon?: React.ComponentProps['name']; + style?: any; +}; + +const CustomButton = ({ + title, + onPress, + type = "primary", + icon, + style +}: CustomButtonProps) => { + const getButtonStyle = () => { + switch (type) { + case "secondary": + return [styles.button, styles.buttonSecondary]; + case "danger": + return [styles.button, styles.buttonDanger]; + case "outline": + return [styles.button, styles.buttonOutline]; + default: + return styles.button; + } + }; + + const getTextStyle = () => { + switch (type) { + case "secondary": + return [styles.buttonText, styles.buttonTextSecondary]; + case "danger": + return [styles.buttonText, styles.buttonTextDanger]; + case "outline": + return [styles.buttonText, styles.buttonTextOutline]; + default: + return styles.buttonText; + } + }; + + return ( + + {icon && ( + s && typeof s === "object" && "color" in s)?.color || "#fff" + : (getTextStyle() as any).color || "#fff" + } + style={styles.buttonIcon} + /> + )} + {title} + + ); +}; + +// Custom Input Component +type CustomInputProps = { + label?: string; + placeholder?: string; + value?: string; + onChangeText?: (text: string) => void; + icon?: React.ComponentProps['name']; + [key: string]: any; +}; + +const CustomInput = ({ + label, + placeholder, + value, + onChangeText, + icon, + ...props +}: CustomInputProps) => { + return ( + + {label && {label}} + + {icon && } + + + + ); +}; type UserProfile = { id: string; @@ -41,6 +141,7 @@ const Profile = () => { const [user, setUser] = useState(null); const [fetching, setFetching] = useState(true); const [editing, setEditing] = useState(false); + const [imageUpdating, setImageUpdating] = useState(false); const fetchUserProfile = async () => { try { @@ -53,7 +154,7 @@ const Profile = () => { setFetching(true); const response = await fetch( - "https://exotic-humpback-mistakenly.ngrok-free.app/api/user/profile/view", + `${base_URL}user/profile/view`, { method: "GET", headers: { @@ -87,7 +188,7 @@ const Profile = () => { const token = credentials.password; const response = await fetch( - "https://exotic-humpback-mistakenly.ngrok-free.app/api/user/profile/update", + `${base_URL}user/profile/update`, { method: "PUT", headers: { @@ -135,230 +236,489 @@ const Profile = () => { }; const handleUpdateImage = async () => { - try { - const credentials = await Keychain.getGenericPassword(); - if (!credentials) { - Alert.alert("Error", "You are not logged in"); - return; - } - const token = credentials.password; - - if (!user?.filePath) { - Alert.alert("Error", "Please select an image first"); - return; - } - - const formData = new FormData(); - formData.append("file", { - uri: user.filePath, - type: "image/jpeg", - name: "profile.jpg", - } as any); - - const response = await fetch( - "https://exotic-humpback-mistakenly.ngrok-free.app/api/user/update/userImg", - { - method: "PUT", - headers: { - Accept: "*/*", - Authorization: `Bearer ${token}`, - }, - body: formData, - } - ); - - const result = await response.json(); - if (result.status === "success") { - Alert.alert("Success", "Profile image updated successfully"); - fetchUserProfile(); - } else { - Alert.alert("Error", "Failed to update profile image"); - } - } catch (error) { - console.error("❌ Error updating profile image:", error); - Alert.alert("Error", "Could not update profile image"); + try { + const credentials = await Keychain.getGenericPassword(); + if (!credentials) { + Alert.alert("Error", "You are not logged in"); + return; } - }; + const token = credentials.password; + + if (!user?.filePath) { + Alert.alert("Error", "Please select an image first"); + return; + } + + setImageUpdating(true); + + const formData = new FormData(); + formData.append("file", { + uri: user.filePath, + type: "image/jpeg", + name: "profile.jpg", + } as any); + + const response = await fetch( + `${base_URL}user/update/userImg`, + { + method: "PUT", + headers: { + Accept: "application/json", + Authorization: `Bearer ${token}`, + }, + body: formData, + } + ); + + const result = await response.json(); + if (result.status === "success") { + Alert.alert("Success", "Profile image updated successfully"); + + // If API returns updated image, set it + if (result.data?.imageBlob) { + setUser((prev) => prev ? { ...prev, imageBlob: result.data.imageBlob, filePath: null } : prev); + } else { + // Otherwise, keep the local filePath until next fetch + setUser((prev) => prev ? { ...prev, filePath: user.filePath } : prev); + } + + // Refresh profile from API as well + fetchUserProfile(); + } else { + Alert.alert("Error", result.message || "Failed to update profile image"); + } + } catch (error) { + console.error("❌ Error updating profile image:", error); + Alert.alert("Error", "Could not update profile image"); + } finally { + setImageUpdating(false); + } +}; + useEffect(() => { fetchUserProfile(); }, []); - const getProfileImage = () => { - if (user?.filePath) return user.filePath; - if (user?.imageBlob) return `data:image/jpeg;base64,${user.imageBlob}`; - return "https://randomuser.me/api/portraits/men/1.jpg"; - }; + console.log("user image :", user?.filePath); +const getProfileImage = () => { + if (user?.imageBlob) { + return `data:image/jpeg;base64,${user.imageBlob}`; + } + if (user?.filePath) { + return user.filePath; + } + return "https://randomuser.me/api/portraits/men/1.jpg"; +}; + if (fetching || !user) { return ( - + Loading profile... ); } return ( - <> + + + + {/* Header */} User Profile - - + + - + + {/* Profile Card */} - - - - - + {/* Profile Image Section */} + + + console.log("Error loading image")} + /> + + + + + + - - {!editing ? ( <> - 👤 {user.firstName} {user.lastName} - 📧 {user.email} - 📱 {user.mobile} - 🔑 {user.username} - 🏠 {user.address} - ⚧ {user.gender} - 🛡 Role: {user.role} + {/* Profile Details */} + + Personal Information + + + Become Organizer + - setEditing(true)} /> + + + + Name + {user.firstName} {user.lastName} + + + + + + + Email + {user.email || "Not provided"} + + + + + + + Mobile + {user.mobile || "Not provided"} + + + + + + + Username + {user.username} + + + + + + + Address + {user.address || "Not provided"} + + + + + + + Gender + {user.gender || "Not specified"} + + + + + + + Role + {user.role || "User"} + + + + + setEditing(true)} + icon="create" + style={styles.editButton} + /> ) : ( <> - setUser({ ...user, firstName: text })} - /> - setUser({ ...user, lastName: text })} - /> - setUser({ ...user, email: text })} - /> - setUser({ ...user, username: text })} - /> - setUser({ ...user, address: text })} - /> - setUser({ ...user, gender: text })} - /> + {/* Edit Form */} + + Edit Profile + + setUser({ ...user, firstName: text })} + icon="person" + /> + + setUser({ ...user, lastName: text })} + icon="person" + /> + + setUser({ ...user, email: text })} + icon="mail" + keyboardType="email-address" + /> + + setUser({ ...user, username: text })} + icon="at" + /> + + setUser({ ...user, address: text })} + icon="location" + multiline + /> + + setUser({ ...user, gender: text })} + icon="male-female" + /> + - - setEditing(false)} - /> + + + setEditing(false)} + icon="close" + style={styles.cancelButton} + /> + )} - + ); }; const styles = StyleSheet.create({ - container: { flex: 1, backgroundColor: "#f5f7fb" }, - loadingContainer: { flex: 1, justifyContent: "center", alignItems: "center" }, - loadingText: { marginTop: 10, fontSize: 16, color: "#007AFF" }, + container: { + flex: 1, + backgroundColor: "#f8fafc" + }, + loadingContainer: { + flex: 1, + justifyContent: "center", + alignItems: "center", + backgroundColor: "#f8fafc" + }, + loadingText: { + marginTop: 10, + fontSize: 16, + color: "#64748b" + }, header: { flexDirection: "row", justifyContent: "space-between", - padding: 16, - paddingTop: 40, - backgroundColor: "#fff", alignItems: "center", - borderBottomWidth: 1, - borderColor: "#eee", + padding: 16, + paddingTop: 50, + backgroundColor: "#6366f1", + borderBottomLeftRadius: 20, + borderBottomRightRadius: 20, + elevation: 4, + shadowColor: "#000", + shadowOffset: { width: 0, height: 2 }, + shadowOpacity: 0.2, + shadowRadius: 4, + }, + headerTitle: { + fontSize: 22, + fontWeight: "700", + color: "#fff" + }, + refreshButton: { + padding: 4, + }, + scrollContainer: { + flex: 1, }, - headerTitle: { fontSize: 20, fontWeight: "600", color: "#333" }, profileCard: { - borderRadius: 16, + borderRadius: 20, margin: 16, backgroundColor: "#fff", padding: 20, shadowColor: "#000", shadowOpacity: 0.1, - shadowRadius: 6, - elevation: 4, + shadowRadius: 10, + shadowOffset: { width: 0, height: 4 }, + elevation: 5, + }, + profileImageSection: { + alignItems: "center", + marginBottom: 24, + paddingBottom: 20, + borderBottomWidth: 1, + borderBottomColor: "#f1f5f9", + }, + avatarContainer: { + position: "relative", + marginBottom: 16, + }, + avatar: { + width: 120, + height: 120, + borderRadius: 60, + borderWidth: 4, + borderColor: "#e2e8f0", }, - profileHeader: { alignItems: "center", marginBottom: 16 }, - avatar: { width: 100, height: 100, borderRadius: 50, marginBottom: 8 }, cameraIcon: { position: "absolute", - right: 110, - bottom: 10, - backgroundColor: "#007AFF", - borderRadius: 15, - width: 32, - height: 32, + right: 0, + bottom: 0, + backgroundColor: "#6366f1", + borderRadius: 20, + width: 40, + height: 40, justifyContent: "center", alignItems: "center", + borderWidth: 3, + borderColor: "#fff", + elevation: 2, }, - detail: { + updateImageButton: { + width: "80%", + }, + detailsSection: { + marginBottom: 24, + }, + sectionTitle: { + fontSize: 18, + fontWeight: "700", + color: "#1e293b", + marginBottom: 16, + paddingBottom: 8, + borderBottomWidth: 1, + borderBottomColor: "#f1f5f9", + }, + detailRow: { + flexDirection: "row", + alignItems: "center", + marginBottom: 16, + paddingHorizontal: 8, + }, + detailIcon: { + marginRight: 12, + }, + detailLabel: { + fontSize: 12, + color: "#64748b", + marginBottom: 2, + }, + detailText: { fontSize: 16, - marginBottom: 10, - color: "#444", - paddingLeft: 4, + color: "#334155", + fontWeight: "500", + }, + editButton: { + marginTop: 8, + }, + editSection: { + marginBottom: 20, + }, + editButtons: { + gap: 12, + }, + saveButton: { + marginTop: 8, + }, + cancelButton: { + marginTop: 4, + }, + inputContainer: { + marginBottom: 16, + }, + inputLabel: { + fontSize: 14, + fontWeight: "600", + color: "#374151", + marginBottom: 6, + }, + inputWrapper: { + flexDirection: "row", + alignItems: "center", + position: "relative", + }, + inputIcon: { + position: "absolute", + left: 12, + zIndex: 1, }, - inputContainer: { marginBottom: 12 }, - inputLabel: { fontSize: 14, fontWeight: "500", color: "#555", marginBottom: 6 }, input: { borderWidth: 1, - borderColor: "#ddd", - borderRadius: 10, + borderColor: "#d1d5db", + borderRadius: 12, padding: 12, - backgroundColor: "#fdfdfd", - color: "#000", - fontSize: 15, + backgroundColor: "#fff", + color: "#1f2937", + fontSize: 16, + flex: 1, + }, + inputWithIcon: { + paddingLeft: 40, }, button: { - backgroundColor: "#007AFF", - paddingVertical: 12, + backgroundColor: "#6366f1", + paddingVertical: 14, borderRadius: 12, alignItems: "center", - marginVertical: 6, - shadowColor: "#007AFF", - shadowOpacity: 0.2, - shadowRadius: 4, - elevation: 3, + justifyContent: "center", + flexDirection: "row", + shadowColor: "#6366f1", + shadowOpacity: 0.3, + shadowRadius: 6, + shadowOffset: { width: 0, height: 3 }, + elevation: 4, }, buttonSecondary: { - backgroundColor: "#e5e5ea", + backgroundColor: "#f1f5f9", }, buttonDanger: { - backgroundColor: "#ff3b30", + backgroundColor: "#ef4444", + }, + buttonOutline: { + backgroundColor: "transparent", + borderWidth: 1, + borderColor: "#6366f1", + }, + buttonText: { + color: "#fff", + fontSize: 16, + fontWeight: "600", + }, + buttonTextSecondary: { + color: "#334155", + }, + buttonTextDanger: { + color: "#fff", + }, + buttonTextOutline: { + color: "#6366f1", + }, + buttonIcon: { + marginRight: 8, }, - buttonText: { color: "#fff", fontSize: 16, fontWeight: "600" }, - buttonTextSecondary: { color: "#333" }, - buttonTextDanger: { color: "#fff" }, }); -export default Profile; +export default Profile; \ No newline at end of file diff --git a/src/utils/ApiUrls.tsx b/src/utils/ApiUrls.tsx index 46771f4..6241a2b 100644 --- a/src/utils/ApiUrls.tsx +++ b/src/utils/ApiUrls.tsx @@ -1,3 +1,3 @@ -export const base_URL = "https://exotic-humpback-mistakenly.ngrok-free.app/api/" +export const base_URL = "https://api.godemo.in/FundCollect/api/" export const LOGIN_URL = `${base_URL}user/generate/otp?mobile=` export const VARIFY_OTP_URL = `${base_URL}user/otp/verify` \ No newline at end of file