Fix suggestions fetch using wrong API base URL
Fallback was http://localhost:8000/api instead of /api, causing silent failure in containerized deployments. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import { useState, useEffect } from 'react'
|
import { useState, useEffect } from 'react'
|
||||||
|
|
||||||
const API_BASE = import.meta.env.VITE_API_URL || 'http://localhost:8000/api'
|
const API_BASE = import.meta.env.VITE_API_URL || '/api'
|
||||||
|
|
||||||
export function useSuggestions() {
|
export function useSuggestions() {
|
||||||
const [suggestions, setSuggestions] = useState({ authors: [], books: [], chapters: [], reviewers: [] })
|
const [suggestions, setSuggestions] = useState({ authors: [], books: [], chapters: [], reviewers: [] })
|
||||||
|
|||||||
Reference in New Issue
Block a user