From f11a4f60b8aa7cee6162728e115b9fa8db344a25 Mon Sep 17 00:00:00 2001 From: Carolyn Zhuang Date: Wed, 11 Dec 2024 01:23:55 -0800 Subject: [PATCH] auth context for login --- App.tsx | 2 +- package-lock.json | 508 +++++++++--------- package.json | 4 +- .../GoogleSignInButton/GoogleSignInButton.tsx | 54 +- .../GoogleSignOutButton.tsx | 30 +- src/context/AuthContext.tsx | 14 +- src/navigation/AppNavigator.tsx | 4 +- src/screens/Contact/Contact.tsx | 19 +- 8 files changed, 338 insertions(+), 297 deletions(-) diff --git a/App.tsx b/App.tsx index ce6b695..7ec107d 100644 --- a/App.tsx +++ b/App.tsx @@ -3,9 +3,9 @@ import { Text } from 'react-native'; import { useFonts } from 'expo-font'; import { DMSans_400Regular, DMSans_700Bold } from '@expo-google-fonts/dm-sans'; import { DefaultTheme } from '@react-navigation/native'; +import { AuthContextProvider } from '@/context/AuthContext'; import AppNavigator from '@/navigation/AppNavigator'; import colors from '@/styles/colors'; -import {AuthContextProvider} from '@/context/AuthContext'; DefaultTheme.colors.background = colors.white; diff --git a/package-lock.json b/package-lock.json index e44f3b7..c579ce2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -66,8 +66,8 @@ "@eslint/object-schema": "^2.1.4", "@ianvs/prettier-plugin-sort-imports": "^4.4.0", "@types/react": "~18.3.12", - "@typescript-eslint/eslint-plugin": "^8.15.0", - "@typescript-eslint/parser": "^8.15.0", + "@typescript-eslint/eslint-plugin": "^8.18.0", + "@typescript-eslint/parser": "^8.18.0", "babel-plugin-module-resolver": "^5.0.2", "eslint": "^8.57.1", "eslint-config-expo": "~8.0.1", @@ -86,9 +86,9 @@ } }, "node_modules/@0no-co/graphql.web": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@0no-co/graphql.web/-/graphql.web-1.0.11.tgz", - "integrity": "sha512-xuSJ9WXwTmtngWkbdEoopMo6F8NLtjy84UNAMsAr5C3/2SgAL/dEU10TMqTIsipqPQ8HA/7WzeqQ9DEQxSvPPA==", + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/@0no-co/graphql.web/-/graphql.web-1.0.12.tgz", + "integrity": "sha512-BTDjjsV/zSPy5fqItwm+KWUfh9CSe9tTtR6rCB72ddtkAxdcHbi4Ir4r/L1Et4lyxmL+i7Rb3m9sjLLi9tYrzA==", "license": "MIT", "peerDependencies": { "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0" @@ -2580,9 +2580,9 @@ } }, "node_modules/@expo/cli": { - "version": "0.22.3", - "resolved": "https://registry.npmjs.org/@expo/cli/-/cli-0.22.3.tgz", - "integrity": "sha512-1HBtqInFDFHUJWzTJ1CJj5MR3JwvOiozmRUWF2kVQAeq/bKzSYM6We6B3XoZBM5XP6z6WtnrG87C7BjeW5E/cA==", + "version": "0.22.5", + "resolved": "https://registry.npmjs.org/@expo/cli/-/cli-0.22.5.tgz", + "integrity": "sha512-A2wYKtcBbEEyRUAyUeMDd356UROo1xaMl7ZaZC5tQOdIhvWKelRd4f3QCaI56D9B4EMWLg9pVuPVbAMz8zJ4+A==", "license": "MIT", "dependencies": { "@0no-co/graphql.web": "^1.0.8", @@ -2598,11 +2598,11 @@ "@expo/osascript": "^2.0.31", "@expo/package-manager": "^1.5.0", "@expo/plist": "^0.2.0", - "@expo/prebuild-config": "^8.0.22", + "@expo/prebuild-config": "^8.0.23", "@expo/rudder-sdk-node": "^1.1.1", "@expo/spawn-async": "^1.7.2", "@expo/xcpretty": "^4.3.0", - "@react-native/dev-middleware": "0.76.3", + "@react-native/dev-middleware": "0.76.5", "@urql/core": "^5.0.6", "@urql/exchange-retry": "^1.3.0", "accepts": "^1.3.8", @@ -3301,9 +3301,9 @@ } }, "node_modules/@expo/metro-config": { - "version": "0.19.6", - "resolved": "https://registry.npmjs.org/@expo/metro-config/-/metro-config-0.19.6.tgz", - "integrity": "sha512-pRwZyOstsQa1+Ecss3wOqC28wjyjq9qxvJaQL3LH4G8Sef9x2PX+ySRApeQ01nl4ZN5nlyez6iVDF51tn/WhOw==", + "version": "0.19.7", + "resolved": "https://registry.npmjs.org/@expo/metro-config/-/metro-config-0.19.7.tgz", + "integrity": "sha512-6Ti05d6AyvXstMpaRGh2EsdGSJzmOh9ju3gMmcjxckn/cimNL39qRQSrnqYc0R/DEZiRFL7N9mVE/0uG668ojw==", "license": "MIT", "dependencies": { "@babel/core": "^7.20.0", @@ -3538,9 +3538,9 @@ } }, "node_modules/@expo/prebuild-config": { - "version": "8.0.22", - "resolved": "https://registry.npmjs.org/@expo/prebuild-config/-/prebuild-config-8.0.22.tgz", - "integrity": "sha512-Kwlf3ymHH37W2nuNA9FzYgZvrImJScLA98939kapnOxfNGAPhmhEw26sfIGmBWAa8ymdL6p+HXQ3+b/xJ74bOg==", + "version": "8.0.23", + "resolved": "https://registry.npmjs.org/@expo/prebuild-config/-/prebuild-config-8.0.23.tgz", + "integrity": "sha512-Zf01kFiN2PISmLb0DhIAJh76v3J2oYUKSjiAtGZLOH0HUz59by/qdyU4mGHWdeyRdCCrLUA21Rct2MBykvRMsg==", "license": "MIT", "dependencies": { "@expo/config": "~10.0.4", @@ -3548,7 +3548,7 @@ "@expo/config-types": "^52.0.0", "@expo/image-utils": "^0.6.0", "@expo/json-file": "^9.0.0", - "@react-native/normalize-colors": "0.76.3", + "@react-native/normalize-colors": "0.76.5", "debug": "^4.3.1", "fs-extra": "^9.0.0", "resolve-from": "^5.0.0", @@ -4227,30 +4227,30 @@ } }, "node_modules/@react-native/assets-registry": { - "version": "0.76.3", - "resolved": "https://registry.npmjs.org/@react-native/assets-registry/-/assets-registry-0.76.3.tgz", - "integrity": "sha512-7Fnc3lzCFFpnoyL1egua6d/qUp0KiIpeSLbfOMln4nI2g2BMzyFHdPjJnpLV2NehmS0omOOkrfRqK5u1F/MXzA==", + "version": "0.76.5", + "resolved": "https://registry.npmjs.org/@react-native/assets-registry/-/assets-registry-0.76.5.tgz", + "integrity": "sha512-MN5dasWo37MirVcKWuysRkRr4BjNc81SXwUtJYstwbn8oEkfnwR9DaqdDTo/hHOnTdhafffLIa2xOOHcjDIGEw==", "license": "MIT", "engines": { "node": ">=18" } }, "node_modules/@react-native/babel-plugin-codegen": { - "version": "0.76.3", - "resolved": "https://registry.npmjs.org/@react-native/babel-plugin-codegen/-/babel-plugin-codegen-0.76.3.tgz", - "integrity": "sha512-mZ7jmIIg4bUnxCqY3yTOkoHvvzsDyrZgfnIKiTGm5QACrsIGa5eT3pMFpMm2OpxGXRDrTMsYdPXE2rCyDX52VQ==", + "version": "0.76.5", + "resolved": "https://registry.npmjs.org/@react-native/babel-plugin-codegen/-/babel-plugin-codegen-0.76.5.tgz", + "integrity": "sha512-xe7HSQGop4bnOLMaXt0aU+rIatMNEQbz242SDl8V9vx5oOTI0VbZV9yLy6yBc6poUlYbcboF20YVjoRsxX4yww==", "license": "MIT", "dependencies": { - "@react-native/codegen": "0.76.3" + "@react-native/codegen": "0.76.5" }, "engines": { "node": ">=18" } }, "node_modules/@react-native/babel-preset": { - "version": "0.76.3", - "resolved": "https://registry.npmjs.org/@react-native/babel-preset/-/babel-preset-0.76.3.tgz", - "integrity": "sha512-zi2nPlQf9q2fmfPyzwWEj6DU96v8ziWtEfG7CTAX2PG/Vjfsr94vn/wWrCdhBVvLRQ6Kvd/MFAuDYpxmQwIiVQ==", + "version": "0.76.5", + "resolved": "https://registry.npmjs.org/@react-native/babel-preset/-/babel-preset-0.76.5.tgz", + "integrity": "sha512-1Nu5Um4EogOdppBLI4pfupkteTjWfmI0hqW8ezWTg7Bezw0FtBj8yS8UYVd3wTnDFT9A5mA2VNoNUqomJnvj2A==", "license": "MIT", "dependencies": { "@babel/core": "^7.25.2", @@ -4294,7 +4294,7 @@ "@babel/plugin-transform-typescript": "^7.25.2", "@babel/plugin-transform-unicode-regex": "^7.24.7", "@babel/template": "^7.25.0", - "@react-native/babel-plugin-codegen": "0.76.3", + "@react-native/babel-plugin-codegen": "0.76.5", "babel-plugin-syntax-hermes-parser": "^0.25.1", "babel-plugin-transform-flow-enums": "^0.0.2", "react-refresh": "^0.14.0" @@ -4307,9 +4307,9 @@ } }, "node_modules/@react-native/codegen": { - "version": "0.76.3", - "resolved": "https://registry.npmjs.org/@react-native/codegen/-/codegen-0.76.3.tgz", - "integrity": "sha512-oJCH/jbYeGmFJql8/y76gqWCCd74pyug41yzYAjREso1Z7xL88JhDyKMvxEnfhSdMOZYVl479N80xFiXPy3ZYA==", + "version": "0.76.5", + "resolved": "https://registry.npmjs.org/@react-native/codegen/-/codegen-0.76.5.tgz", + "integrity": "sha512-FoZ9VRQ5MpgtDAnVo1rT9nNRfjnWpE40o1GeJSDlpUMttd36bVXvsDm8W/NhX8BKTWXSX+CPQJsRcvN1UPYGKg==", "license": "MIT", "dependencies": { "@babel/parser": "^7.25.3", @@ -4372,13 +4372,13 @@ } }, "node_modules/@react-native/community-cli-plugin": { - "version": "0.76.3", - "resolved": "https://registry.npmjs.org/@react-native/community-cli-plugin/-/community-cli-plugin-0.76.3.tgz", - "integrity": "sha512-vgsLixHS24jR0d0QqPykBWFaC+V8x9cM3cs4oYXw3W199jgBNGP9MWcUJLazD2vzrT/lUTVBVg0rBeB+4XR6fg==", + "version": "0.76.5", + "resolved": "https://registry.npmjs.org/@react-native/community-cli-plugin/-/community-cli-plugin-0.76.5.tgz", + "integrity": "sha512-3MKMnlU0cZOWlMhz5UG6WqACJiWUrE3XwBEumzbMmZw3Iw3h+fIsn+7kLLE5EhzqLt0hg5Y4cgYFi4kOaNgq+g==", "license": "MIT", "dependencies": { - "@react-native/dev-middleware": "0.76.3", - "@react-native/metro-babel-transformer": "0.76.3", + "@react-native/dev-middleware": "0.76.5", + "@react-native/metro-babel-transformer": "0.76.5", "chalk": "^4.0.0", "execa": "^5.1.1", "invariant": "^2.2.4", @@ -4491,22 +4491,22 @@ "license": "ISC" }, "node_modules/@react-native/debugger-frontend": { - "version": "0.76.3", - "resolved": "https://registry.npmjs.org/@react-native/debugger-frontend/-/debugger-frontend-0.76.3.tgz", - "integrity": "sha512-pMHQ3NpPB28RxXciSvm2yD+uDx3pkhzfuWkc7VFgOduyzPSIr0zotUiOJzsAtrj8++bPbOsAraCeQhCqoOTWQw==", + "version": "0.76.5", + "resolved": "https://registry.npmjs.org/@react-native/debugger-frontend/-/debugger-frontend-0.76.5.tgz", + "integrity": "sha512-5gtsLfBaSoa9WP8ToDb/8NnDBLZjv4sybQQj7rDKytKOdsXm3Pr2y4D7x7GQQtP1ZQRqzU0X0OZrhRz9xNnOqA==", "license": "BSD-3-Clause", "engines": { "node": ">=18" } }, "node_modules/@react-native/dev-middleware": { - "version": "0.76.3", - "resolved": "https://registry.npmjs.org/@react-native/dev-middleware/-/dev-middleware-0.76.3.tgz", - "integrity": "sha512-b+2IpW40z1/S5Jo5JKrWPmucYU/PzeGyGBZZ/SJvmRnBDaP3txb9yIqNZAII1EWsKNhedh8vyRO5PSuJ9Juqzw==", + "version": "0.76.5", + "resolved": "https://registry.npmjs.org/@react-native/dev-middleware/-/dev-middleware-0.76.5.tgz", + "integrity": "sha512-f8eimsxpkvMgJia7POKoUu9uqjGF6KgkxX4zqr/a6eoR1qdEAWUd6PonSAqtag3PAqvEaJpB99gLH2ZJI1nDGg==", "license": "MIT", "dependencies": { "@isaacs/ttlcache": "^1.4.1", - "@react-native/debugger-frontend": "0.76.3", + "@react-native/debugger-frontend": "0.76.5", "chrome-launcher": "^0.15.2", "chromium-edge-launcher": "^0.2.0", "connect": "^3.6.5", @@ -4546,31 +4546,31 @@ } }, "node_modules/@react-native/gradle-plugin": { - "version": "0.76.3", - "resolved": "https://registry.npmjs.org/@react-native/gradle-plugin/-/gradle-plugin-0.76.3.tgz", - "integrity": "sha512-t0aYZ8ND7+yc+yIm6Yp52bInneYpki6RSIFZ9/LMUzgMKvEB62ptt/7sfho9QkKHCNxE1DJSWIqLIGi/iHHkyg==", + "version": "0.76.5", + "resolved": "https://registry.npmjs.org/@react-native/gradle-plugin/-/gradle-plugin-0.76.5.tgz", + "integrity": "sha512-7KSyD0g0KhbngITduC8OABn0MAlJfwjIdze7nA4Oe1q3R7qmAv+wQzW+UEXvPah8m1WqFjYTkQwz/4mK3XrQGw==", "license": "MIT", "engines": { "node": ">=18" } }, "node_modules/@react-native/js-polyfills": { - "version": "0.76.3", - "resolved": "https://registry.npmjs.org/@react-native/js-polyfills/-/js-polyfills-0.76.3.tgz", - "integrity": "sha512-pubJFArMMrdZiytH+W95KngcSQs+LsxOBsVHkwgMnpBfRUxXPMK4fudtBwWvhnwN76Oe+WhxSq7vOS5XgoPhmw==", + "version": "0.76.5", + "resolved": "https://registry.npmjs.org/@react-native/js-polyfills/-/js-polyfills-0.76.5.tgz", + "integrity": "sha512-ggM8tcKTcaqyKQcXMIvcB0vVfqr9ZRhWVxWIdiFO1mPvJyS6n+a+lLGkgQAyO8pfH0R1qw6K9D0nqbbDo865WQ==", "license": "MIT", "engines": { "node": ">=18" } }, "node_modules/@react-native/metro-babel-transformer": { - "version": "0.76.3", - "resolved": "https://registry.npmjs.org/@react-native/metro-babel-transformer/-/metro-babel-transformer-0.76.3.tgz", - "integrity": "sha512-b2zQPXmW7avw/7zewc9nzMULPIAjsTwN03hskhxHUJH5pzUf7pIklB3FrgYPZrRhJgzHiNl3tOPu7vqiKzBYPg==", + "version": "0.76.5", + "resolved": "https://registry.npmjs.org/@react-native/metro-babel-transformer/-/metro-babel-transformer-0.76.5.tgz", + "integrity": "sha512-Cm9G5Sg5BDty3/MKa3vbCAJtT3YHhlEaPlQALLykju7qBS+pHZV9bE9hocfyyvc5N/osTIGWxG5YOfqTeMu1oQ==", "license": "MIT", "dependencies": { "@babel/core": "^7.25.2", - "@react-native/babel-preset": "0.76.3", + "@react-native/babel-preset": "0.76.5", "hermes-parser": "0.23.1", "nullthrows": "^1.1.1" }, @@ -4582,9 +4582,9 @@ } }, "node_modules/@react-native/normalize-colors": { - "version": "0.76.3", - "resolved": "https://registry.npmjs.org/@react-native/normalize-colors/-/normalize-colors-0.76.3.tgz", - "integrity": "sha512-Yrpmrh4IDEupUUM/dqVxhAN8QW1VEUR3Qrk2lzJC1jB2s46hDe0hrMP2vs12YJqlzshteOthjwXQlY0TgIzgbg==", + "version": "0.76.5", + "resolved": "https://registry.npmjs.org/@react-native/normalize-colors/-/normalize-colors-0.76.5.tgz", + "integrity": "sha512-6QRLEok1r55gLqj+94mEWUENuU5A6wsr2OoXpyq/CgQ7THWowbHtru/kRGRr6o3AQXrVnZheR60JNgFcpNYIug==", "license": "MIT" }, "node_modules/@react-native/virtualized-lists": { @@ -4767,9 +4767,9 @@ } }, "node_modules/@supabase/auth-js": { - "version": "2.65.1", - "resolved": "https://registry.npmjs.org/@supabase/auth-js/-/auth-js-2.65.1.tgz", - "integrity": "sha512-IA7i2Xq2SWNCNMKxwmPlHafBQda0qtnFr8QnyyBr+KaSxoXXqEzFCnQ1dGTy6bsZjVBgXu++o3qrDypTspaAPw==", + "version": "2.66.1", + "resolved": "https://registry.npmjs.org/@supabase/auth-js/-/auth-js-2.66.1.tgz", + "integrity": "sha512-kOW+04SuDXmP2jRX9JL1Rgzduj8BcOG1qC3RaWdZsxnv89svNCdLRv8PfXW3QPKJdw0k1jF30OlQDPkzbDEL9w==", "license": "MIT", "dependencies": { "@supabase/node-fetch": "^2.6.14" @@ -4806,9 +4806,9 @@ } }, "node_modules/@supabase/realtime-js": { - "version": "2.10.9", - "resolved": "https://registry.npmjs.org/@supabase/realtime-js/-/realtime-js-2.10.9.tgz", - "integrity": "sha512-0AjN65VDNIScZzrrPaVvlND4vbgVS+j9Wcy3zf7e+l9JY4IwCTahFenPLcKy9bkr7KY0wfB7MkipZPKxMaDnjw==", + "version": "2.11.2", + "resolved": "https://registry.npmjs.org/@supabase/realtime-js/-/realtime-js-2.11.2.tgz", + "integrity": "sha512-u/XeuL2Y0QEhXSoIPZZwR6wMXgB+RQbJzG9VErA3VghVt7uRfSVsjeqd7m5GhX3JR6dM/WRmLbVR8URpDWG4+w==", "license": "MIT", "dependencies": { "@supabase/node-fetch": "^2.6.14", @@ -4827,16 +4827,16 @@ } }, "node_modules/@supabase/supabase-js": { - "version": "2.47.1", - "resolved": "https://registry.npmjs.org/@supabase/supabase-js/-/supabase-js-2.47.1.tgz", - "integrity": "sha512-Q5zBX3BhK4tIFE6W8TK7NP29G9XCX8nzMydHONI8e/6HjYnKmUyNf33rsTTwGVVlXz2ruzJKO+EX4wuwD21Q4g==", + "version": "2.47.3", + "resolved": "https://registry.npmjs.org/@supabase/supabase-js/-/supabase-js-2.47.3.tgz", + "integrity": "sha512-AmwTyHtOXdfjLVKiM+neYItB62T4gAl1jV8ZrIg3yp1Z1NICzYfsujJDSuELkrLkYvU/RGfZXpIBheDTt7fmwA==", "license": "MIT", "dependencies": { - "@supabase/auth-js": "2.65.1", + "@supabase/auth-js": "2.66.1", "@supabase/functions-js": "2.4.3", "@supabase/node-fetch": "2.6.15", "@supabase/postgrest-js": "1.16.3", - "@supabase/realtime-js": "2.10.9", + "@supabase/realtime-js": "2.11.2", "@supabase/storage-js": "2.7.1" } }, @@ -4976,9 +4976,9 @@ "license": "MIT" }, "node_modules/@types/react": { - "version": "18.3.14", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.14.tgz", - "integrity": "sha512-NzahNKvjNhVjuPBQ+2G7WlxstQ+47kXZNHlUvFakDViuIEfGY926GqhMueQFZ7woG+sPiQKlF36XfrIUVSUfFg==", + "version": "18.3.16", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.16.tgz", + "integrity": "sha512-oh8AMIC4Y2ciKufU8hnKgs+ufgbA/dhPTACaZPM86AbwX9QwnFtSoPWEeRUj8fge+v6kFt78BXcDhAU1SrrAsw==", "license": "MIT", "dependencies": { "@types/prop-types": "*", @@ -5036,17 +5036,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.17.0.tgz", - "integrity": "sha512-HU1KAdW3Tt8zQkdvNoIijfWDMvdSweFYm4hWh+KwhPstv+sCmWb89hCIP8msFm9N1R/ooh9honpSuvqKWlYy3w==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.18.0.tgz", + "integrity": "sha512-NR2yS7qUqCL7AIxdJUQf2MKKNDVNaig/dEB0GBLU7D+ZdHgK1NoH/3wsgO3OnPVipn51tG3MAwaODEGil70WEw==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.17.0", - "@typescript-eslint/type-utils": "8.17.0", - "@typescript-eslint/utils": "8.17.0", - "@typescript-eslint/visitor-keys": "8.17.0", + "@typescript-eslint/scope-manager": "8.18.0", + "@typescript-eslint/type-utils": "8.18.0", + "@typescript-eslint/utils": "8.18.0", + "@typescript-eslint/visitor-keys": "8.18.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -5061,25 +5061,21 @@ }, "peerDependencies": { "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", - "eslint": "^8.57.0 || ^9.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" } }, "node_modules/@typescript-eslint/parser": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.17.0.tgz", - "integrity": "sha512-Drp39TXuUlD49F7ilHHCG7TTg8IkA+hxCuULdmzWYICxGXvDXmDmWEjJYZQYgf6l/TFfYNE167m7isnc3xlIEg==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.18.0.tgz", + "integrity": "sha512-hgUZ3kTEpVzKaK3uNibExUYm6SKKOmTU2BOxBSvOYwtJEPdVQ70kZJpPjstlnhCHcuc2WGfSbpKlb/69ttyN5Q==", "dev": true, - "license": "BSD-2-Clause", + "license": "MITClause", "dependencies": { - "@typescript-eslint/scope-manager": "8.17.0", - "@typescript-eslint/types": "8.17.0", - "@typescript-eslint/typescript-estree": "8.17.0", - "@typescript-eslint/visitor-keys": "8.17.0", + "@typescript-eslint/scope-manager": "8.18.0", + "@typescript-eslint/types": "8.18.0", + "@typescript-eslint/typescript-estree": "8.18.0", + "@typescript-eslint/visitor-keys": "8.18.0", "debug": "^4.3.4" }, "engines": { @@ -5090,23 +5086,19 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.17.0.tgz", - "integrity": "sha512-/ewp4XjvnxaREtqsZjF4Mfn078RD/9GmiEAtTeLQ7yFdKnqwTOgRMSvFz4et9U5RiJQ15WTGXPLj89zGusvxBg==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.18.0.tgz", + "integrity": "sha512-PNGcHop0jkK2WVYGotk/hxj+UFLhXtGPiGtiaWgVBVP1jhMoMCHlTyJA+hEj4rszoSdLTK3fN4oOatrL0Cp+Xw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.17.0", - "@typescript-eslint/visitor-keys": "8.17.0" + "@typescript-eslint/types": "8.18.0", + "@typescript-eslint/visitor-keys": "8.18.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -5117,14 +5109,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.17.0.tgz", - "integrity": "sha512-q38llWJYPd63rRnJ6wY/ZQqIzPrBCkPdpIsaCfkR3Q4t3p6sb422zougfad4TFW9+ElIFLVDzWGiGAfbb/v2qw==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.18.0.tgz", + "integrity": "sha512-er224jRepVAVLnMF2Q7MZJCq5CsdH2oqjP4dT7K6ij09Kyd+R21r7UVJrF0buMVdZS5QRhDzpvzAxHxabQadow==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.17.0", - "@typescript-eslint/utils": "8.17.0", + "@typescript-eslint/typescript-estree": "8.18.0", + "@typescript-eslint/utils": "8.18.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -5136,18 +5128,14 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" } }, "node_modules/@typescript-eslint/types": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.17.0.tgz", - "integrity": "sha512-gY2TVzeve3z6crqh2Ic7Cr+CAv6pfb0Egee7J5UAVWCpVvDI/F71wNfolIim4FE6hT15EbpZFVUj9j5i38jYXA==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.18.0.tgz", + "integrity": "sha512-FNYxgyTCAnFwTrzpBGq+zrnoTO4x0c1CKYY5MuUTzpScqmY5fmsh2o3+57lqdI3NZucBDCzDgdEbIaNfAjAHQA==", "dev": true, "license": "MIT", "engines": { @@ -5159,14 +5147,14 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.17.0.tgz", - "integrity": "sha512-JqkOopc1nRKZpX+opvKqnM3XUlM7LpFMD0lYxTqOTKQfCWAmxw45e3qlOCsEqEB2yuacujivudOFpCnqkBDNMw==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.18.0.tgz", + "integrity": "sha512-rqQgFRu6yPkauz+ms3nQpohwejS8bvgbPyIDq13cgEDbkXt4LH4OkDMT0/fN1RUtzG8e8AKJyDBoocuQh8qNeg==", "dev": true, - "license": "BSD-2-Clause", + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.17.0", - "@typescript-eslint/visitor-keys": "8.17.0", + "@typescript-eslint/types": "8.18.0", + "@typescript-eslint/visitor-keys": "8.18.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -5181,10 +5169,8 @@ "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "peerDependencies": { + "typescript": ">=4.8.4 <5.8.0" } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { @@ -5204,16 +5190,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.17.0.tgz", - "integrity": "sha512-bQC8BnEkxqG8HBGKwG9wXlZqg37RKSMY7v/X8VEWD8JG2JuTHuNK0VFvMPMUKQcbk6B+tf05k+4AShAEtCtJ/w==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.18.0.tgz", + "integrity": "sha512-p6GLdY383i7h5b0Qrfbix3Vc3+J2k6QWw6UMUeY5JGfm3C5LbZ4QIZzJNoNOfgyRe0uuYKjvVOsO/jD4SJO+xg==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.17.0", - "@typescript-eslint/types": "8.17.0", - "@typescript-eslint/typescript-estree": "8.17.0" + "@typescript-eslint/scope-manager": "8.18.0", + "@typescript-eslint/types": "8.18.0", + "@typescript-eslint/typescript-estree": "8.18.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -5223,22 +5209,18 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.17.0.tgz", - "integrity": "sha512-1Hm7THLpO6ww5QU6H/Qp+AusUUl+z/CAm3cNZZ0jQvon9yicgO7Rwd+/WWRpMKLYV6p2UvdbR27c86rzCPpreg==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.18.0.tgz", + "integrity": "sha512-pCh/qEA8Lb1wVIqNvBke8UaRjJ6wrAWkJO5yyIbs8Yx6TNGYyfNjOo61tLv+WwLvoLPp4BQ8B7AHKijl8NGUfw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.17.0", + "@typescript-eslint/types": "8.18.0", "eslint-visitor-keys": "^4.2.0" }, "engines": { @@ -5263,16 +5245,16 @@ } }, "node_modules/@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.1.tgz", + "integrity": "sha512-fEzPV3hSkSMltkw152tJKNARhOupqbH96MZWyRjNaYZOMIzbrTeQDG+MTc6Mr2pgzFQzFxAfmhGDNP5QK++2ZA==", "dev": true, "license": "ISC" }, "node_modules/@urql/core": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/@urql/core/-/core-5.0.8.tgz", - "integrity": "sha512-1GOnUw7/a9bzkcM0+U8U5MmxW2A7FE5YquuEmcJzTtW5tIs2EoS4F2ITpuKBjRBbyRjZgO860nWFPo1m4JImGA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@urql/core/-/core-5.1.0.tgz", + "integrity": "sha512-yC3sw8yqjbX45GbXxfiBY8GLYCiyW/hLBbQF9l3TJrv4ro00Y0ChkKaD9I2KntRxAVm9IYBqh0awX8fwWAe/Yw==", "license": "MIT", "dependencies": { "@0no-co/graphql.web": "^1.0.5", @@ -5986,9 +5968,9 @@ } }, "node_modules/babel-preset-expo": { - "version": "12.0.3", - "resolved": "https://registry.npmjs.org/babel-preset-expo/-/babel-preset-expo-12.0.3.tgz", - "integrity": "sha512-1695e8y3U/HjifKx33vcNnFMSUSXwPWwhFxRlL6NRx2TENN6gySH82gPOWgxcra6gi+EJgXx52xG3PcqTjwW6w==", + "version": "12.0.4", + "resolved": "https://registry.npmjs.org/babel-preset-expo/-/babel-preset-expo-12.0.4.tgz", + "integrity": "sha512-SAzAwqpyjA+/OFrU95OOioj6oTeCv4+rRfrNmBTy5S/gJswrZKBSPJioFudIaJBy43W+BL7HA5AspBIF6tO/aA==", "license": "MIT", "dependencies": { "@babel/plugin-proposal-decorators": "^7.12.9", @@ -5997,7 +5979,7 @@ "@babel/plugin-transform-parameters": "^7.22.15", "@babel/preset-react": "^7.22.15", "@babel/preset-typescript": "^7.23.0", - "@react-native/babel-preset": "0.76.3", + "@react-native/babel-preset": "0.76.5", "babel-plugin-react-native-web": "~0.19.13", "react-refresh": "^0.14.2" }, @@ -6434,16 +6416,15 @@ } }, "node_modules/call-bind": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", "license": "MIT", "dependencies": { + "call-bind-apply-helpers": "^1.0.0", "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" + "set-function-length": "^1.2.2" }, "engines": { "node": ">= 0.4" @@ -6452,6 +6433,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", + "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/caller-callsite": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", @@ -6505,9 +6499,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001686", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001686.tgz", - "integrity": "sha512-Y7deg0Aergpa24M3qLC5xjNklnKnhsmSyR/V89dLZ1n0ucJIFNs7PgR2Yfa/Zf6W79SbBicgtGxZr2juHkEUIA==", + "version": "1.0.30001687", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001687.tgz", + "integrity": "sha512-0S/FDhf4ZiqrTUiQ39dKeUjYRjkv7lOZU1Dgif2rIqrTzX/1wV2hfKu9TOm1IHkdSijfLswxTFzl/cvir+SLSQ==", "funding": [ { "type": "opencollective", @@ -7240,9 +7234,9 @@ } }, "node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "license": "MIT", "dependencies": { "ms": "^2.1.3" @@ -7629,6 +7623,20 @@ "url": "https://dotenvx.com" } }, + "node_modules/dunder-proto": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.0.tgz", + "integrity": "sha512-9+Sj30DIu+4KvHqMfLUGLFYL2PkURSYMVXJyXe92nFRvlYq5hBjLEhblKB+vkd/WVlUYMWigiY07T91Fkk0+4A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -7642,9 +7650,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.71", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.71.tgz", - "integrity": "sha512-dB68l59BI75W1BUGVTAEJy45CEVuEGy9qPVVQ8pnHyHMn36PLPPoE1mjLH+lo9rKulO3HC2OhbACI/8tCqJBcA==", + "version": "1.5.72", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.72.tgz", + "integrity": "sha512-ZpSAUOZ2Izby7qnZluSrAlGgGQzucmFbN0n64dYzocYxnxV5ufurpj3VgEe4cUp7ir9LmeLxNYo8bVnlM8bQHw==", "license": "ISC" }, "node_modules/emoji-regex": { @@ -7792,13 +7800,10 @@ } }, "node_modules/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, "engines": { "node": ">= 0.4" } @@ -8666,25 +8671,25 @@ } }, "node_modules/expo": { - "version": "52.0.17", - "resolved": "https://registry.npmjs.org/expo/-/expo-52.0.17.tgz", - "integrity": "sha512-f0WBD2T6p9r/a8v8MqkoWQq7TmbbAgPUg2zZtOp+kBrSCb3obHeNAsPDAUFzh+jEgug2qDVVkauBJa6ACe9AMg==", + "version": "52.0.18", + "resolved": "https://registry.npmjs.org/expo/-/expo-52.0.18.tgz", + "integrity": "sha512-z+qdUbH0d5JRknE3VrY0s5k+3j5JpsLx4vXRwV4To8Xm5uf3d642FQ2HbuPWFAAhtSKFQsxQAh3iuAUGAWDBhg==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.20.0", - "@expo/cli": "0.22.3", + "@expo/cli": "0.22.5", "@expo/config": "~10.0.6", "@expo/config-plugins": "~9.0.12", "@expo/fingerprint": "0.11.3", - "@expo/metro-config": "0.19.6", + "@expo/metro-config": "0.19.7", "@expo/vector-icons": "^14.0.0", - "babel-preset-expo": "~12.0.3", + "babel-preset-expo": "~12.0.4", "expo-asset": "~11.0.1", "expo-constants": "~17.0.3", - "expo-file-system": "~18.0.4", + "expo-file-system": "~18.0.5", "expo-font": "~13.0.1", "expo-keep-awake": "~14.0.1", - "expo-modules-autolinking": "2.0.3", + "expo-modules-autolinking": "2.0.4", "expo-modules-core": "2.1.1", "fbemitter": "^3.0.0", "web-streams-polyfill": "^3.3.2", @@ -8803,13 +8808,13 @@ } }, "node_modules/expo-dev-client": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/expo-dev-client/-/expo-dev-client-5.0.5.tgz", - "integrity": "sha512-LfrJ/a1UVqU1LxQ2oaduKWx2F0/1wDsiUv4lic4a2ug9wazGSR+bZ88fRlnAbhdMBfuymUKBMyUA+X3WDqf/bw==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/expo-dev-client/-/expo-dev-client-5.0.6.tgz", + "integrity": "sha512-UMrS21EQ5TMooQgLp+0YrH+UKpxvO+SzkrAdWyVTrjUJ1Qi1yQCbtcErXkYbAdLbItSF3H04fVvd0lzg0KL3Wg==", "license": "MIT", "dependencies": { - "expo-dev-launcher": "5.0.18", - "expo-dev-menu": "6.0.13", + "expo-dev-launcher": "5.0.19", + "expo-dev-menu": "6.0.14", "expo-dev-menu-interface": "1.9.2", "expo-manifests": "~0.15.0", "expo-updates-interface": "~1.0.0" @@ -8819,13 +8824,13 @@ } }, "node_modules/expo-dev-launcher": { - "version": "5.0.18", - "resolved": "https://registry.npmjs.org/expo-dev-launcher/-/expo-dev-launcher-5.0.18.tgz", - "integrity": "sha512-rPPTR0KoHHpYl0MOAxc3IUZ/cUge3CFgE3Qmk8ccpQDL/PmhodsPqTcV6fnyKf1xuTa6hT7qI6CHJtSZbx6xNA==", + "version": "5.0.19", + "resolved": "https://registry.npmjs.org/expo-dev-launcher/-/expo-dev-launcher-5.0.19.tgz", + "integrity": "sha512-3zlOxpWVuV1RDe8OKoejL7XhzidHvtg3iEw564dhXePH5J+Ha9Owkqqiz7A27iqQrENjU/XWBtOxHszj+OBk4Q==", "license": "MIT", "dependencies": { "ajv": "8.11.0", - "expo-dev-menu": "6.0.13", + "expo-dev-menu": "6.0.14", "expo-manifests": "~0.15.0", "resolve-from": "^5.0.0" }, @@ -8856,9 +8861,9 @@ "license": "MIT" }, "node_modules/expo-dev-menu": { - "version": "6.0.13", - "resolved": "https://registry.npmjs.org/expo-dev-menu/-/expo-dev-menu-6.0.13.tgz", - "integrity": "sha512-wLzTqGY89boVMNEqoWgIzYc7G6aXEsvsQrEXg9S5jkKfVyRcNvL46ppKkdGQ8AKkLm/wFQ2XkCk7C5izhxIb6g==", + "version": "6.0.14", + "resolved": "https://registry.npmjs.org/expo-dev-menu/-/expo-dev-menu-6.0.14.tgz", + "integrity": "sha512-bG4NXm4epHSmZdWW9hZCS7dTcKO82CyVfYMbNSOw5o/FKO9cY/AgfSj6ERPE9zBqYEJJEJaoJ0mzv0d47/h23g==", "license": "MIT", "dependencies": { "expo-dev-menu-interface": "1.9.2" @@ -8889,9 +8894,9 @@ } }, "node_modules/expo-file-system": { - "version": "18.0.4", - "resolved": "https://registry.npmjs.org/expo-file-system/-/expo-file-system-18.0.4.tgz", - "integrity": "sha512-aAWEDwnu0XHOBYvQ9Q0+QIa+483vYJaC4IDsXyWQ73Rtsg273NZh5kYowY+cAocvoSmA99G6htrLBn11ax2bTQ==", + "version": "18.0.5", + "resolved": "https://registry.npmjs.org/expo-file-system/-/expo-file-system-18.0.5.tgz", + "integrity": "sha512-vm7gA+PB7j99hfvBBFMRiti8OeazFK3AZWtDmCi6WQCXDxngXkAJViXhkHyF3xwDKljzlP8+4BIGrKCzbfoObg==", "license": "MIT", "dependencies": { "web-streams-polyfill": "^3.3.2" @@ -8958,9 +8963,9 @@ } }, "node_modules/expo-modules-autolinking": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/expo-modules-autolinking/-/expo-modules-autolinking-2.0.3.tgz", - "integrity": "sha512-Q/ALJ54eS7Cr7cmbP+unEDTkHFQivQerWWrqZxuXOrSFYGCYU22+/xAZXaJOpZwseOVsP74zSkoRY/wBimVs7w==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/expo-modules-autolinking/-/expo-modules-autolinking-2.0.4.tgz", + "integrity": "sha512-e0p+19NhmD50U7s7BV7kWIypWmTNC9n/VlJKlXS05hM/zX7pe6JKmXyb+BFnXJq3SLBalLCUY0tu2gEUF3XeVg==", "license": "MIT", "dependencies": { "@expo/spawn-async": "^1.7.2", @@ -9407,9 +9412,9 @@ "license": "MIT" }, "node_modules/flow-parser": { - "version": "0.255.0", - "resolved": "https://registry.npmjs.org/flow-parser/-/flow-parser-0.255.0.tgz", - "integrity": "sha512-7QHV2m2mIMh6yIMaAPOVbyNEW77IARwO69d4DgvfDCjuORiykdMLf7XBjF7Zeov7Cpe1OXJ8sB6/aaCE3xuRBw==", + "version": "0.256.0", + "resolved": "https://registry.npmjs.org/flow-parser/-/flow-parser-0.256.0.tgz", + "integrity": "sha512-HFb/GgB7hq+TYosLJuMLdLp8aGlyAVfrJaTvcM0w2rz2T33PjkVbRU419ncK/69cjowUksewuspkBheq9ZX9Hw==", "license": "MIT", "engines": { "node": ">=0.4.0" @@ -9611,16 +9616,19 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.5.tgz", + "integrity": "sha512-Y4+pKa7XeRUPWFNvOOYHkRYrfzW07oraURSvjDmRVOJ748OrVmeXtpE4+GCEHncjCjkTxPNRt8kEbxDhsn6VTg==", "license": "MIT", "dependencies": { + "call-bind-apply-helpers": "^1.0.0", + "dunder-proto": "^1.0.0", + "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2" }, "engines": { "node": ">= 0.4" @@ -9868,12 +9876,13 @@ } }, "node_modules/has-proto": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.1.0.tgz", - "integrity": "sha512-QLdzI9IIO1Jg7f9GT1gXpPpXArAn6cS31R1eEZqz08Gc+uQ8/XiqHWt17Fiw+2p6oTTIq5GXEpQkAlA88YRl/Q==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz", + "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==", + "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7" + "dunder-proto": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -11086,9 +11095,9 @@ } }, "node_modules/jsesc": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", - "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", "license": "MIT", "bin": { "jsesc": "bin/jsesc" @@ -12544,9 +12553,9 @@ "license": "MIT" }, "node_modules/node-releases": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", - "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", + "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", "license": "MIT" }, "node_modules/nodemon": { @@ -13886,19 +13895,19 @@ "license": "MIT" }, "node_modules/react-native": { - "version": "0.76.3", - "resolved": "https://registry.npmjs.org/react-native/-/react-native-0.76.3.tgz", - "integrity": "sha512-0TUhgmlouRNf6yuDIIAdbQl0g1VsONgCMsLs7Et64hjj5VLMCA7np+4dMrZvGZ3wRNqzgeyT9oWJsUm49AcwSQ==", + "version": "0.76.5", + "resolved": "https://registry.npmjs.org/react-native/-/react-native-0.76.5.tgz", + "integrity": "sha512-op2p2kB+lqMF1D7AdX4+wvaR0OPFbvWYs+VBE7bwsb99Cn9xISrLRLAgFflZedQsa5HvnOGrULhtnmItbIKVVw==", "license": "MIT", "dependencies": { "@jest/create-cache-key-function": "^29.6.3", - "@react-native/assets-registry": "0.76.3", - "@react-native/codegen": "0.76.3", - "@react-native/community-cli-plugin": "0.76.3", - "@react-native/gradle-plugin": "0.76.3", - "@react-native/js-polyfills": "0.76.3", - "@react-native/normalize-colors": "0.76.3", - "@react-native/virtualized-lists": "0.76.3", + "@react-native/assets-registry": "0.76.5", + "@react-native/codegen": "0.76.5", + "@react-native/community-cli-plugin": "0.76.5", + "@react-native/gradle-plugin": "0.76.5", + "@react-native/js-polyfills": "0.76.5", + "@react-native/normalize-colors": "0.76.5", + "@react-native/virtualized-lists": "0.76.5", "abort-controller": "^3.0.0", "anser": "^1.4.9", "ansi-regex": "^5.0.0", @@ -13989,9 +13998,9 @@ } }, "node_modules/react-native-reanimated": { - "version": "3.16.3", - "resolved": "https://registry.npmjs.org/react-native-reanimated/-/react-native-reanimated-3.16.3.tgz", - "integrity": "sha512-OWlA6e1oHhytTpc7WiSZ7Tmb8OYwLKYZz29Sz6d6WAg60Hm5GuAiKIWUG7Ako7FLcYhFkA0pEQ2xPMEYUo9vlw==", + "version": "3.16.5", + "resolved": "https://registry.npmjs.org/react-native-reanimated/-/react-native-reanimated-3.16.5.tgz", + "integrity": "sha512-mq/5k14pimkhCeP9XwFJkEr8XufaHqIekum8fqpsn0fcBzbLvyiqfM2LEuBvi0+DTv5Bd2dHmUHkYqGYfkj3Jw==", "license": "MIT", "dependencies": { "@babel/plugin-transform-arrow-functions": "^7.0.0-0", @@ -14180,9 +14189,9 @@ "license": "MIT" }, "node_modules/react-native/node_modules/@react-native/virtualized-lists": { - "version": "0.76.3", - "resolved": "https://registry.npmjs.org/@react-native/virtualized-lists/-/virtualized-lists-0.76.3.tgz", - "integrity": "sha512-wTGv9pVh3vAOWb29xFm+J9VRe9dUcUcb9FyaMLT/Hxa88W4wqa5ZMe1V9UvrrBiA1G5DKjv8/1ZcDsJhyugVKA==", + "version": "0.76.5", + "resolved": "https://registry.npmjs.org/@react-native/virtualized-lists/-/virtualized-lists-0.76.5.tgz", + "integrity": "sha512-M/fW1fTwxrHbcx0OiVOIxzG6rKC0j9cR9Csf80o77y1Xry0yrNPpAlf8D1ev3LvHsiAUiRNFlauoPtodrs2J1A==", "license": "MIT", "dependencies": { "invariant": "^2.2.4", @@ -14389,19 +14398,20 @@ } }, "node_modules/reflect.getprototypeof": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.7.tgz", - "integrity": "sha512-bMvFGIUKlc/eSfXNX+aZ+EL95/EgZzuwA0OBPTbZZDEJw/0AkentjMuM1oiRfwHrshqk4RzdgiTg5CcDalXN5g==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.8.tgz", + "integrity": "sha512-B5dj6usc5dkk8uFliwjwDHM8To5/QwdKz9JcBZ8Ic4G1f0YmeeJTtE/ZTdgRFPAfxZFiUaPhZ1Jcs4qeagItGQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", "define-properties": "^1.2.1", + "dunder-proto": "^1.0.0", "es-abstract": "^1.23.5", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "which-builtin-type": "^1.1.4" + "gopd": "^1.2.0", + "which-builtin-type": "^1.2.0" }, "engines": { "node": ">= 0.4" @@ -14497,6 +14507,18 @@ "regjsparser": "bin/parser" } }, + "node_modules/regjsparser/node_modules/jsesc": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", + "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/remove-trailing-slash": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/remove-trailing-slash/-/remove-trailing-slash-0.1.1.tgz", @@ -17001,9 +17023,9 @@ } }, "node_modules/zod": { - "version": "3.23.8", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz", - "integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==", + "version": "3.24.1", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.24.1.tgz", + "integrity": "sha512-muH7gBL9sI1nciMZV67X5fTKKBLtwpZ5VBp1vsOQzj1MhrBZ4wlVCm3gedKZWLp0Oyel8sIGfeiz54Su+OVT+A==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" diff --git a/package.json b/package.json index 79222c4..0a32563 100644 --- a/package.json +++ b/package.json @@ -72,8 +72,8 @@ "@eslint/object-schema": "^2.1.4", "@ianvs/prettier-plugin-sort-imports": "^4.4.0", "@types/react": "~18.3.12", - "@typescript-eslint/eslint-plugin": "^8.15.0", - "@typescript-eslint/parser": "^8.15.0", + "@typescript-eslint/eslint-plugin": "^8.18.0", + "@typescript-eslint/parser": "^8.18.0", "babel-plugin-module-resolver": "^5.0.2", "eslint": "^8.57.1", "eslint-config-expo": "~8.0.1", diff --git a/src/components/GoogleSignInButton/GoogleSignInButton.tsx b/src/components/GoogleSignInButton/GoogleSignInButton.tsx index 0b6a60b..9268eb5 100644 --- a/src/components/GoogleSignInButton/GoogleSignInButton.tsx +++ b/src/components/GoogleSignInButton/GoogleSignInButton.tsx @@ -5,9 +5,9 @@ import * as Google from 'expo-auth-session/providers/google'; import * as WebBrowser from 'expo-web-browser'; import { CompositeScreenProps } from '@react-navigation/native'; import { NativeStackScreenProps } from '@react-navigation/native-stack'; +import { useAuth } from '@/context/AuthContext'; import { LoginStackParamList, RootStackParamList } from '@/types/navigation'; import { styles } from './styles'; -import { useAuth } from '@/context/AuthContext'; WebBrowser.maybeCompleteAuthSession(); @@ -16,9 +16,11 @@ type GoogleSignInButtonProps = CompositeScreenProps< NativeStackScreenProps >; -export default function GoogleSignInButton({ navigation }: GoogleSignInButtonProps) { - const { setAuthenticated } = useAuth(); - const [request, response, promptAsync] = Google.useAuthRequest({ +export default function GoogleSignInButton({ + navigation, +}: GoogleSignInButtonProps) { + const { setAuthenticated } = useAuth(); + const [, response, promptAsync] = Google.useAuthRequest({ webClientId: process.env.EXPO_PUBLIC_GOOGLE_WEB_CLIENT_ID, androidClientId: process.env.EXPO_PUBLIC_GOOGLE_ANDROID_CLIENT_ID, iosClientId: process.env.EXPO_PUBLIC_GOOGLE_IOS_CLIENT_ID, @@ -26,29 +28,35 @@ export default function GoogleSignInButton({ navigation }: GoogleSignInButtonPro }); useEffect(() => { - if (response?.type === 'success' && response.authentication?.accessToken) { - handleSignInWithGoogle(response.authentication.accessToken); - } - }, [response]); + const handleSignInWithGoogle = async (token: string) => { + try { + const userResponse = await fetch( + 'https://www.googleapis.com/userinfo/v2/me', + { + headers: { Authorization: `Bearer ${token}` }, + }, + ); - const handleSignInWithGoogle = async (token: string) => { - try { - const userResponse = await fetch('https://www.googleapis.com/userinfo/v2/me', { - headers: { Authorization: `Bearer ${token}` }, - }); - - if (userResponse.ok) { - await setAuthenticated(true); - navigation.navigate('BottomTabs', { screen: 'Home', params: { screen: 'TreeSearch' } }); - } else { - console.error('Authentication failed'); + if (userResponse.ok) { + await setAuthenticated(true); + navigation.navigate('BottomTabs', { + screen: 'Home', + params: { screen: 'TreeSearch' }, + }); + } else { + console.error('Authentication failed'); + await setAuthenticated(false); + } + } catch (error) { + console.error('Failed to sign in with Google:', error); await setAuthenticated(false); } - } catch (error) { - console.error('Failed to sign in with Google:', error); - await setAuthenticated(false); + }; + + if (response?.type === 'success' && response.authentication?.accessToken) { + handleSignInWithGoogle(response.authentication.accessToken); } - }; + }, [response, navigation, setAuthenticated]); return ( promptAsync()}> diff --git a/src/components/GoogleSignOutButton/GoogleSignOutButton.tsx b/src/components/GoogleSignOutButton/GoogleSignOutButton.tsx index ed8d497..5337e79 100644 --- a/src/components/GoogleSignOutButton/GoogleSignOutButton.tsx +++ b/src/components/GoogleSignOutButton/GoogleSignOutButton.tsx @@ -1,25 +1,30 @@ -import { TouchableOpacity, Text } from 'react-native'; +import { Text, TouchableOpacity } from 'react-native'; import AsyncStorage from '@react-native-async-storage/async-storage'; -import { useAuth } from '@/context/AuthContext'; -import { NativeStackScreenProps } from '@react-navigation/native-stack'; import { CommonActions } from '@react-navigation/native'; +import { NativeStackScreenProps } from '@react-navigation/native-stack'; +import { useAuth } from '@/context/AuthContext'; import { ContactStackParamList } from '@/types/navigation'; import { styles } from './styles'; -type GoogleSignOutButtonProps = NativeStackScreenProps; +type GoogleSignOutButtonProps = NativeStackScreenProps< + ContactStackParamList, + 'Contact' +>; -export default function GoogleSignOutButton({ navigation }: GoogleSignOutButtonProps) { - const { setAuthenticated } = useAuth(); +export default function GoogleSignOutButton({ + navigation, +}: GoogleSignOutButtonProps) { + const { setAuthenticated } = useAuth(); const handleSignOut = async () => { try { await AsyncStorage.setItem('authenticated', 'false'); - await setAuthenticated(false); + await setAuthenticated(false); navigation.dispatch( CommonActions.reset({ index: 0, routes: [{ name: 'LoginStack' }], - }) + }), ); } catch (error) { console.error('Error signing out:', error); @@ -27,13 +32,8 @@ export default function GoogleSignOutButton({ navigation }: GoogleSignOutButtonP }; return ( - - - Sign out - + + Sign out ); } diff --git a/src/context/AuthContext.tsx b/src/context/AuthContext.tsx index 09a8d7b..c2e126c 100644 --- a/src/context/AuthContext.tsx +++ b/src/context/AuthContext.tsx @@ -1,4 +1,10 @@ -import React, { createContext, useContext, useState, useEffect, ReactNode } from 'react'; +import React, { + createContext, + ReactNode, + useContext, + useEffect, + useState, +} from 'react'; import AsyncStorage from '@react-native-async-storage/async-storage'; type AuthState = { @@ -16,19 +22,19 @@ export const AuthContextProvider = ({ children }: { children: ReactNode }) => { try { const storedAuth = await AsyncStorage.getItem('authenticated'); console.log('Auth state from storage:', storedAuth); - setIsAuthenticated(storedAuth === 'true'); + setIsAuthenticated(storedAuth === 'true'); } catch (error) { console.error('Error loading authentication state:', error); } }; syncAuthState(); - }, []); + }, []); const setAuthenticated = async (value: boolean) => { try { await AsyncStorage.setItem('authenticated', value ? 'true' : 'false'); - setIsAuthenticated(value); + setIsAuthenticated(value); } catch (error) { console.error('Failed to update authentication state:', error); } diff --git a/src/navigation/AppNavigator.tsx b/src/navigation/AppNavigator.tsx index 4a39081..eaa886b 100644 --- a/src/navigation/AppNavigator.tsx +++ b/src/navigation/AppNavigator.tsx @@ -2,6 +2,7 @@ import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; import { NavigationContainer } from '@react-navigation/native'; import { createStackNavigator } from '@react-navigation/stack'; import QRCodeScanner from '@/components/QRCodeScanner/QRCodeScanner'; +import { useAuth } from '@/context/AuthContext'; import ContactScreen from '@/screens/Contact/Contact'; import DirectoryScreen from '@/screens/Directory/Directory'; import LoginScreen from '@/screens/Login/Login'; @@ -15,7 +16,6 @@ import { LoginStackParamList, RootStackParamList, } from '@/types/navigation'; -import { useAuth } from '@/context/AuthContext'; // Stack and Tab Navigators const LoginStack = createStackNavigator(); @@ -79,7 +79,7 @@ function BottomTabNavigator() { // Root Navigator export default function AppNavigator() { - const { isAuthenticated } = useAuth(); + const { isAuthenticated } = useAuth(); return ( diff --git a/src/screens/Contact/Contact.tsx b/src/screens/Contact/Contact.tsx index 172232e..8e9fea6 100644 --- a/src/screens/Contact/Contact.tsx +++ b/src/screens/Contact/Contact.tsx @@ -1,13 +1,19 @@ import React from 'react'; import { Image, ScrollView, Text, View } from 'react-native'; -import { styles } from './styles'; -import GoogleSignOutButton from '@/components/GoogleSignOutButton/GoogleSignOutButton'; import { NativeStackScreenProps } from '@react-navigation/native-stack'; +import GoogleSignOutButton from '@/components/GoogleSignOutButton/GoogleSignOutButton'; import { ContactStackParamList } from '@/types/navigation'; +import { styles } from './styles'; -type ContactScreenProps = NativeStackScreenProps; +type ContactScreenProps = NativeStackScreenProps< + ContactStackParamList, + 'Contact' +>; -export default function ContactScreen({ navigation, route }: ContactScreenProps) { +export default function ContactScreen({ + navigation, + route, +}: ContactScreenProps) { return ( @@ -22,10 +28,9 @@ export default function ContactScreen({ navigation, route }: ContactScreenProps) - {/* temporary button */} - - + + Contact Us