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:
parent
5793836394
commit
e593ae595b
@ -5,8 +5,10 @@ import { ArrowLeft, Heart } from "lucide-react";
|
||||
import React from "react";
|
||||
import ReactMarkdown, { Components } from "react-markdown";
|
||||
import remarkGfm from "remark-gfm";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
const ReadmePage = () => {
|
||||
const router = useRouter();
|
||||
const readmeContent = `
|
||||
## Attune Heart Therapy
|
||||
|
||||
@ -39,7 +41,6 @@ Your Attune Heart Therapy platform includes a comprehensive system for managing
|
||||
|
||||
**Email Address:** \`Hello@AttuneHeartTherapy.com\`
|
||||
|
||||
**Password:** \`G&n2S;ffTc8f\`
|
||||
|
||||
### Step 3: Access Dashboard
|
||||
|
||||
@ -296,7 +297,7 @@ For technical assistance, questions, or issues:
|
||||
<div className="bg-white p-8 rounded-lg shadow-md">
|
||||
<Button
|
||||
className="bg-gray-100 hover:bg-gray-50 shadow-md text-black"
|
||||
onClick={() => window.history.back()}
|
||||
onClick={() => router.push("/")}
|
||||
>
|
||||
<ArrowLeft className="mr-2" />
|
||||
</Button>
|
||||
|
||||
@ -457,3 +457,7 @@ export function ForgotPasswordDialog({ open, onOpenChange, onSuccess }: ForgotPa
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,13 +1,5 @@
|
||||
// Get API base URL from environment variable
|
||||
const getApiBaseUrl = () => {
|
||||
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_BASE_URL = process.env.NEXT_PUBLIC_API_URL;
|
||||
|
||||
export const API_ENDPOINTS = {
|
||||
auth: {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user