Skip to content

Commit

Permalink
fixing server routes
Browse files Browse the repository at this point in the history
  • Loading branch information
acekyd committed Jan 23, 2025
1 parent c188359 commit 6aa751c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extensions-site/app/routes/detail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ export default function DetailPage() {
const { id } = useParams();
const [server, setServer] = useState<Server | null>(null);
const [isCommandVisible, setIsCommandVisible] = useState(true);
const baseUrl = import.meta.env.REACT_APP_BASENAME || "";
const baseUrl = (import.meta.env.REACT_APP_BASENAME || "").replace(/\/+$/, ""); // Remove trailing slashes

useEffect(() => {
fetch(`${baseUrl}servers.json`)
fetch(`${baseUrl}/servers.json`)
.then((res) => res.json())
.then((servers) => {
const matchingServer = servers.find((s: Server) => s.id === id);
Expand Down

0 comments on commit 6aa751c

Please sign in to comment.