Yes — in this codebase, newsletter **does hit backend**. ### Newsletter logic flow 1. UI component is `Subscribe`: - `src/components/footer/footer-top/Subscribe.js` 2. On click of **Subscribe** button: - `handleSubmit()` runs - Validates email with regex locally - If valid, calls `mutate({ email })` ```25:35:src/components/footer/footer-top/Subscribe.js const handleSubmit = () => { const regex = ...; if (regex.test(emailAddress) === true) { mutate( { email: emailAddress }, { onSuccess: handleSuccess, onError: onErrorResponse, } ); } ``` 3. `mutate` comes from React Query hook: - `src/api-manage/hooks/react-query/newsletter/usePostNewsletterEmail.js` ```5:7:src/api-manage/hooks/react-query/newsletter/usePostNewsletterEmail.js const postHandler = async (value) => { const { data } = await MainApi.post(subscribe_api, value); return data; }; ``` 4. Endpoint used: - `subscribe_api = "/api/v1/newsletter/subscribe"` - from `src/api-manage/ApiRoutes.js` So request is: - **Method:** `POST` - **URL:** `/api/v1/newsletter/subscribe` - **Body:** `{ email: "user@example.com" }` --- ### Is it really backend or local-only? It is backend-bound. `MainApi.post(...)` is an axios HTTP call. In browser mode `MainApi` uses relative URL (so it goes through your app/proxy), then reaches API backend. ```6:8:src/api-manage/MainApi.js const MainApi = axios.create({ baseURL: typeof window !== "undefined" ? "" : baseUrl, }); ``` --- ### Why you may think it isn’t hitting backend sometimes - Invalid email: it never calls API, only shows toast. - Network/proxy issue: request fails and `onErrorResponse` runs. - If button loading spins, request was triggered. --- ### How you can confirm quickly Open DevTools → Network → click Subscribe with valid email: - Look for `POST /api/v1/newsletter/subscribe` - Check payload has your email - Check response code (200/201 success, 4xx/5xx failure) If you want, I can also help you add a temporary console/network debug snippet to confirm each submit attempt clearly. ----------------------------------------------------------------------------------------------- You’re seeing that page because your flow currently goes through this backend URL first: - `.../payment-mobile?...` (from your frontend checkout code) Then backend does Stripe setup and redirects to Stripe checkout. During that server step, backend returns the plain text page: **“Please do not refresh this page…”**. So this is expected with current architecture — it’s not a frontend-only issue. ## Why your loader is not enough You already added app-side loader before redirect, but once browser leaves your app and opens `payment-mobile`, your React UI is gone. At that point, only backend page content controls what user sees. ## Best way to make it system-like ### Option A (recommended) Change backend payment flow to return a **Stripe checkout URL/session**, then frontend redirects directly to it. - Frontend: - place order - call payment init API (returns `stripe_checkout_url`) - show branded loader modal - `window.location.href = stripe_checkout_url` - Result: no ugly intermediate “do not refresh” page. ### Option B (faster backend-only patch) Keep `payment-mobile`, but redesign that backend intermediate page: - add centered loader/spinner - brand logo + message (“Redirecting securely to Stripe…”) - auto redirect script - clean white/neutral UI This still shows an intermediate page, but it looks professional. ### Option C (best UX for long term) Use Stripe JS checkout/session handling in your app (server creates session; client uses Stripe redirect helpers), with full error handling and retry. --- ## What to ask backend team (exactly) 1. In `payment-mobile` flow, do not render plain text. 2. Either: - return JSON `{ checkout_url }` (preferred), or - render branded loading HTML instead of plain message. 3. Ensure callback/return URLs are preserved. --- ## Quick diagnosis summary - **Root cause:** backend intermediate page content. - **Need backend update?** **Yes**, for full fix. - **Frontend-only can’t fully remove it** if backend still routes through that text page. If you want, I can draft a concrete API contract for Option A (request/response fields) so your backend and frontend can implement it cleanly. ------------------------------------------------------------------- You’re 100% correct — this happens because the frontend is trying to **infer** review state, but the API response is not reliable enough for that. ### Why it still happens From your current code: - Review separation (`Pending Review` vs `Reviewed`) is based on `order/details` data and checks fields like `is_reviewed`, `review_id`, `review`, etc. ```236:255:src/components/my-orders/index.js const isItemReviewed = (item) => Boolean( item?.is_reviewed || item?.is_review || item?.reviewed || item?.review || item?.review_data || item?.item_review || item?.item_review_id || item?.customer_review || item?.review_id ); ``` - If backend does **not** send those fields for an already-reviewed item, frontend classifies it as pending. - Then submit hits `/api/v1/items/reviews/submit` and backend correctly returns: - `{"code":"review","message":"Already submitted"}` So yes: this is primarily a **backend contract gap**. --- ## Do you need backend update / new APIs? ### Minimum required backend fix (best) Update existing `GET /api/v1/customer/order/details` response so each order item includes explicit review state, e.g.: - `is_item_reviewed: true/false` - `item_review: { rating, comment, created_at } | null` - `is_deliveryman_reviewed: true/false` (if applicable per order) - `deliveryman_review: {...} | null` With this, frontend filtering and button visibility will be accurate. ### Alternative (new endpoint) Add a dedicated endpoint like: - `GET /api/v1/customer/order/review-status?order_id=...` returning normalized status per item + deliveryman. This is cleaner if you don’t want to modify order-details payload. --- ## Frontend handling you should also add Even with backend fix, frontend should handle duplicate-submit gracefully: - If error is `code: "review"` + `message: "Already submitted"`: - treat item as reviewed in UI - hide submit button immediately - refresh order review state for that order Right now generic error handling just toasts and doesn’t reconcile state: ```42:51:src/api-manage/api-error-response/ErrorResponses.js if (data?.errors?.length > 0) { data.errors.forEach((item) => { handleTokenExpire(item, status); }); } ``` --- ## Bottom line - **Yes**, backend should be updated (or new review-status API added) for correct separation. - Frontend should also implement an `Already submitted` fallback to sync UI instantly. If you want, I can give you the exact backend response schema and frontend mapping rules in a copy-paste-ready format for your backend dev. [flag dropdown] [+country code] | [editable phone number] ----404 error when I add fund with stripe. ----Comment new features like review module. Toaster for any input error in vendor registeration. In notification section, Mark as read have some issue. In popup review card, the layout is not proper. and it is not returning after delivering the order. extras In items you like in every module in home screen. Add a horizontal scroller. In iPhone SE view, the categories in a module are overlapping by navbar. In fact almost everything is overlapping by navbar. john3@wick.test No@12345. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ GMP-108: now in seller registration (vendor/registration) form qa gave me this Email validation error appears too late during the "As a Seller Registration" process. Description In the seller registration process, after completing the "Account Information" form, when the user selects a business plan and clicks "Next," an error message states that the entered email is invalid but the email is new and not registered. This validation should be displayed earlier in the process, specifically when the email is initially entered, to improve user experience and prevent delays. when i am at 1st step and press next it should send the data to backend to check the email or phone already exists at first step hit the backend to see only this Tell backend developer this: Add a read-only availability check used only before final registration. Purpose Return whether email and phone are already used by: an approved / active store, a pending application, or a rejected / denied application (so the product rules match your business: e.g. still block reuse or allow retry depending on status). Suggested API shape (adjust names to your Laravel routes) Method: POST (body has email/phone; avoids putting phone in query string). Path (example): POST /api/v1/auth/vendor/check-contact (or vendor/register/availability—one consistent name is enough.) Request body (JSON) { "email": "user@example.com", "phone": "+14155550100" } Normalize email (trim, lowercase) and phone (same rules as registration: country code, formatting) on the server so checks match signup. Success response (both allowed) 200 with body like: { "email_available": true, "phone_available": true } When already used Either: 422 with Laravel-style validation: { "message": "…", "errors": { "email": ["The email has already been taken."], "phone": ["The phone has already been taken."] } } or a 200 with explicit flags (your frontend can branch): { "email_available": false, "phone_available": true, "email_reason": "pending_store", "phone_reason": null } Pick one style so the web app doesn’t mix patterns. Backend logic (what they should query) In one place (service method), check all relevant tables/models, for example: Stores / vendors linked to users (email, phone). Pending vendor applications (same identifiers). Rejected/denied rows if you still want to block reuse or show a specific message. Return per-field availability (and optional reason: active_store | pending | denied) so support and UX stay clear. Security / abuse Rate limit this endpoint (same IP / email). Don’t leak whether an email exists in customer vs vendor unless that’s intended; scope checks to vendor/store flows only. Alternative (no new route) If they refuse a new endpoint: Add a dry_run / validate_only flag on POST /api/v1/auth/vendor/register that runs all validations (including duplicate email/phone across pending/active/denied) but does not insert and returns 422 with the same error shape. That requires a deliberate backend change; it’s not automatic. One line for your developer “Please add a lightweight POST endpoint that accepts email + phone, checks uniqueness across active stores, pending vendor applications, and denied applications (per our rules), returns availability or field errors, and never creates a store—so the React app can call it on step 1 without calling full registration twice.”