Fix repo issues: deploy link, SPA routing, and console logs#23
Fix repo issues: deploy link, SPA routing, and console logs#23Hrithik-05-Roshan wants to merge 1 commit into
Conversation
- Added a fallback for `process.env.FRONTEND_URL` in the server's deploy controller to ensure generated deploy URLs are valid when environment variables are missing (Fixes Issue 1). - Created a `render.yaml` configuration at the repository root to enable SPA rewrite routing (`/*` to `/index.html`) for the React frontend on Render.com deployments (Fixes Issue 2). - Replaced direct `window.location.href` navigation with `navigate` via `useNavigate` hook in `Pricing.jsx` to prevent SPA routing 404s after successful Razorpay payments (Fixes Issue 3). - Cleaned up console logging across the frontend codebase by removing debugging `console.log(result)` lines and updating `console.log(error)` inside catch blocks to `console.error`. Co-authored-by: Hrithik-05-Roshan <182404308+Hrithik-05-Roshan@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
This pull request resolves a series of related bugs involving URL generation, SPA routing fallbacks, navigation state, and logging readability.
Fixes implemented:
deployfunction now falls back to"https://webify-ai-1.onrender.com"whenprocess.env.FRONTEND_URLis undefined, preventing links from resolving toundefined/site/:slugleading to 404s.render.yamlat the project root defining rewrite rules (/*->/index.html) to correctly handle React Router navigation fallback when pages are directly loaded or refreshed.window.location.href = "/dashboard"for thereact-router-domstandardnavigate("/dashboard")after payment completion, preventing full page reloads that triggred 404 routing errors.console.log(error)forconsole.errorand cleaned up residual debug messages on successful API posts.PR created automatically by Jules for task 17973872772833499629 started by @Hrithik-05-Roshan