Skip to content

working page redirection - #343

Merged
ND68 merged 2 commits into
mainfrom
gia/donor-offer-notif-redirect
Apr 14, 2026
Merged

ND68 merged 2 commits into
mainfrom
gia/donor-offer-notif-redirect

Conversation

@giannacastr

Copy link
Copy Markdown
Contributor

Description

Resolves ticket number: #278

Explain what your code changes:
Now, when clicking "View the Donor Offer" once a notification is made, the screen redirects correctly to the items tab instead of the distributions tab (from the partners' end).

List the steps you took to test your code:
I signed into both the partner1 and partner2 accounts to make sure both redirected correctly to the items page.

Checklist

  • The ticket is mentioned above
  • The changes fulfill the success criteria of the ticket
  • The changes were self-reviewed
  • A review was requested

@netlify

netlify Bot commented Apr 14, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for hope-for-haiti ready!

Name Link
🔨 Latest commit 6e1b23a
🔍 Latest deploy log https://app.netlify.com/projects/hope-for-haiti/deploys/69ddb1ba657cd70008c3d423
😎 Deploy Preview https://deploy-preview-343--hope-for-haiti.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@giannacastr
giannacastr requested a review from ND68 April 14, 2026 02:51
@giannacastr giannacastr self-assigned this Apr 14, 2026
@greptile-apps

greptile-apps Bot commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes an incorrect redirect for partner users visiting a donor offer URL — they are now sent to /items instead of /. A secondary incidental change converts the Joyride import in Tutorial.tsx from a default import to a named import, which is compatible with the react-joyride v3.x API.

Confidence Score: 5/5

  • This PR is safe to merge — both changes are minimal, targeted, and correct.
  • The redirect fix is a one-line change to the correct path. The import refactor in Tutorial.tsx is valid for react-joyride v3.x. No logic regressions, no missing edge cases, no style violations found.
  • No files require special attention.

Important Files Changed

Filename Overview
src/app/donorOffers/[donorOfferId]/page.tsx Changes the partner redirect from "/" to "/items" — the core bug fix. Logic is correct and straightforward.
src/components/Tutorial.tsx Converts Joyride import from default to named import style. Valid for react-joyride v3.x which exports Joyride as a named export per official docs.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Partner clicks 'View Donor Offer'] --> B[DonorOfferDetailsPage]
    B --> C{session loaded?}
    C -- No --> D[redirect /signIn]
    C -- Yes --> E{isPartner?}
    E -- Yes\n[BEFORE] --> F_OLD[redirect /]
    E -- Yes\n[AFTER] --> F_NEW[redirect /items ✅]
    E -- No --> G{hasAnyPermission?}
    G -- Yes --> H{donorOffer.state}
    H -- UNFINALIZED --> I[AdminDynamicDonorOfferScreen]
    H -- FINALIZED --> J[AdminAllocateDonorOfferScreen]
    H -- ARCHIVED --> K[AdminArchivedDonorOfferScreen]
    G -- No --> L[redirect /]
Loading

Reviews (1): Last reviewed commit: "working page redirection" | Re-trigger Greptile

@giannacastr giannacastr linked an issue Apr 14, 2026 that may be closed by this pull request
@ND68
ND68 merged commit 918df19 into main Apr 14, 2026
5 checks passed
@ND68
ND68 deleted the gia/donor-offer-notif-redirect branch April 14, 2026 03:25
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.

Donor Offer Notif Redirect

2 participants