Skip to content

fix: save multiple climb fields - #1469

Open
manikantavarma2889 wants to merge 1 commit into
OpenBeta:developfrom
manikantavarma2889:fix/issue-1461-multiple-climb-fields
Open

manikantavarma2889 wants to merge 1 commit into
OpenBeta:developfrom
manikantavarma2889:fix/issue-1461-multiple-climb-fields

Conversation

@manikantavarma2889

@manikantavarma2889 manikantavarma2889 commented Sep 7, 2026 •

Copy link
Copy Markdown

Pull Request Template for Issue #1469

name: Pull request
about: Create a pull request
title: ''
labels: ''
assignees: ''


What type of PR is this?(check all applicable)

  • bug fix
  • refactor
  • feature
  • documentation
  • optimization
  • other

What this PR achieves

Fixes the 401 error that occurs when saving more than one climb field at a time. Previously, each climb edit form independently called useSession({ required: true }), getting separate access tokens. When the first save succeeded, the session token became invalidated, causing subsequent saves to fail with 401 errors.

This PR moves the useSession() call to the page level and shares the accessToken with all four climb edit forms, ensuring all API calls use the same valid session token.

Notes

  • Modified 5 files: 1 page + 4 form components
  • All climb edit forms now share the same session token
  • Prevents 401 errors when saving multiple climb fields sequentially

Summary of Changes
Files Modified (5 files):

src/app/(default)/editClimb/[slug]/page.tsx - Added page-level useSession() and shares accessToken with all forms
src/app/(default)/editClimb/[slug]/components/ClimbNameForm.tsx - Accepts shared accessToken prop
src/app/(default)/editClimb/[slug]/components/ClimbDescriptionForm.tsx - Accepts shared accessToken prop
`src/app/(default)/editClimb/[slug])

This branch was successfully deployed

1 active deployment
Preview — 42583ea0 Deployed Sep 17, 2026 by manikantavarma2889 via Validate Railway/Nixpacks build #3526
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant