-
Notifications
You must be signed in to change notification settings - Fork 38
Release/2.0.16 #1993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Release/2.0.16 #1993
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
7aaeb42
Initial plan
Copilot 16196c6
feat: add edit profile photo and name functionality
Copilot d5d8af0
fix: address CodeRabbit review feedback on profile edit
Copilot 7ee88e9
fix: address CodeRabbit round-2 inline review comments
Copilot d21e68b
Merge main into development
github-actions[bot] 6d02921
fix: upgrade nativewind to 4.2.3 and @packrat-ai/nativewindui to 2.0.…
mikib0 eaa6977
Merge pull request #1982 from PackRat-AI:fix/upgrade-nativewindui
mikib0 8490999
add missing imports
Isthisanmol d369165
fix-unresponsive-share-button
Isthisanmol 876f82d
merge development
Isthisanmol 7dd1a78
correct materialcommunity icon
Isthisanmol b54852c
Add edit profile photo and name functionality
Isthisanmol 08084d1
feat(pack-templates): add support for video import and substitute gpt…
mikib0 9f9bf18
fix(api/contaner): update response handling to use parsed format
mikib0 2fb189c
refactor(api/container): remove debug logging for API response
mikib0 8674e08
Merge pull request #1988 from PackRat-AI/feat/pack-template-from-video
mikib0 b21f1dd
chore: bump version to v2.0.16
mikib0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| import { userStore } from 'expo-app/features/auth/store'; | ||
| import axiosInstance, { handleApiError } from 'expo-app/lib/api/client'; | ||
| import { useState } from 'react'; | ||
|
|
||
| export type UpdateProfilePayload = { | ||
| firstName?: string; | ||
| lastName?: string; | ||
| email?: string; | ||
| avatarUrl?: string | null; | ||
| }; | ||
|
|
||
| export function useUpdateProfile() { | ||
| const [isLoading, setIsLoading] = useState(false); | ||
| const [error, setError] = useState<string | null>(null); | ||
|
|
||
| const updateProfile = async (payload: UpdateProfilePayload): Promise<boolean> => { | ||
| setIsLoading(true); | ||
| setError(null); | ||
| try { | ||
| const response = await axiosInstance.put('/api/user/profile', payload); | ||
| if (response.data?.user) { | ||
| userStore.set(response.data.user); | ||
|
mikib0 marked this conversation as resolved.
|
||
| } | ||
| return true; | ||
| } catch (err) { | ||
| const { message } = handleApiError(err); | ||
| setError(message); | ||
| return false; | ||
| } finally { | ||
| setIsLoading(false); | ||
| } | ||
| }; | ||
|
|
||
| return { updateProfile, isLoading, error }; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.