Refactor ReadmePage to use Next.js router for navigation and remove sensitive information. Update API_BASE_URL assignment for cleaner implementation in api_urls.ts. Clean up ForgotPasswordDialog component by removing unnecessary whitespace.

This commit is contained in:
iamkiddy 2025-11-25 17:26:30 +00:00
parent 5793836394
commit e593ae595b
3 changed files with 8 additions and 11 deletions

View File

@ -5,8 +5,10 @@ import { ArrowLeft, Heart } from "lucide-react";
import React from "react"; import React from "react";
import ReactMarkdown, { Components } from "react-markdown"; import ReactMarkdown, { Components } from "react-markdown";
import remarkGfm from "remark-gfm"; import remarkGfm from "remark-gfm";
import { useRouter } from "next/navigation";
const ReadmePage = () => { const ReadmePage = () => {
const router = useRouter();
const readmeContent = ` const readmeContent = `
## Attune Heart Therapy ## Attune Heart Therapy
@ -39,7 +41,6 @@ Your Attune Heart Therapy platform includes a comprehensive system for managing
**Email Address:** \`Hello@AttuneHeartTherapy.com\` **Email Address:** \`Hello@AttuneHeartTherapy.com\`
**Password:** \`G&n2S;ffTc8f\`
### Step 3: Access Dashboard ### Step 3: Access Dashboard
@ -296,7 +297,7 @@ For technical assistance, questions, or issues:
<div className="bg-white p-8 rounded-lg shadow-md"> <div className="bg-white p-8 rounded-lg shadow-md">
<Button <Button
className="bg-gray-100 hover:bg-gray-50 shadow-md text-black" className="bg-gray-100 hover:bg-gray-50 shadow-md text-black"
onClick={() => window.history.back()} onClick={() => router.push("/")}
> >
<ArrowLeft className="mr-2" /> <ArrowLeft className="mr-2" />
</Button> </Button>

View File

@ -457,3 +457,7 @@ export function ForgotPasswordDialog({ open, onOpenChange, onSuccess }: ForgotPa
); );
} }

View File

@ -1,13 +1,5 @@
// Get API base URL from environment variable // Get API base URL from environment variable
const getApiBaseUrl = () => { export const API_BASE_URL = process.env.NEXT_PUBLIC_API_URL;
const baseUrl = process.env.NEXT_PUBLIC_API_URL || "";
// Remove trailing slash if present
const cleanUrl = baseUrl.replace(/\/$/, "");
// Add /api if not already present
return cleanUrl ? `${cleanUrl}/api` : "";
};
export const API_BASE_URL = getApiBaseUrl();
export const API_ENDPOINTS = { export const API_ENDPOINTS = {
auth: { auth: {