fix(api-docs): Use absolute API URL for Interactive Explorer link
The Interactive Explorer link was using a relative URL (/v1/docs/), which caused it to open on the current subdomain instead of the API subdomain. This resulted in users being redirected to the dashboard. Changed to use API_BASE_URL to construct the absolute URL, which will correctly point to: - Local: http://lvh.me:8000/v1/docs/ - Production: https://api.smoothschedule.com/v1/docs/ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
|||||||
AlertCircle,
|
AlertCircle,
|
||||||
} from 'lucide-react';
|
} from 'lucide-react';
|
||||||
import { useTestTokensForDocs } from '../hooks/useApiTokens';
|
import { useTestTokensForDocs } from '../hooks/useApiTokens';
|
||||||
|
import { API_BASE_URL } from '../api/config';
|
||||||
|
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
// TYPES & CONSTANTS
|
// TYPES & CONSTANTS
|
||||||
@@ -1111,7 +1112,7 @@ my $response = $ua->get('${SANDBOX_URL}/services/',
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
<a
|
<a
|
||||||
href="/v1/docs/"
|
href={`${API_BASE_URL}/v1/docs/`}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
className="flex items-center gap-2 px-4 py-2 text-sm font-medium text-purple-600 dark:text-purple-400 hover:bg-purple-50 dark:hover:bg-purple-900/20 rounded-lg transition-colors"
|
className="flex items-center gap-2 px-4 py-2 text-sm font-medium text-purple-600 dark:text-purple-400 hover:bg-purple-50 dark:hover:bg-purple-900/20 rounded-lg transition-colors"
|
||||||
|
|||||||
Reference in New Issue
Block a user