Put in more env variables and fallback to localhost if BACKEND_URL and BACKEND_PORT is not found

Fixed imports for react imports for useMemo, useEffect etc from hosts and HostDetail files
This commit is contained in:
Muhammad Ibrahim
2025-09-26 00:53:44 +01:00
parent 3c01c4bfb2
commit 641272dfb8
8 changed files with 11 additions and 11 deletions

View File

@@ -23,7 +23,7 @@ import {
Users,
X,
} from "lucide-react";
import { useEffect, useId, useState } from "react";
import { useEffect, useId, useMemo, useState } from "react";
import { Link, useNavigate, useSearchParams } from "react-router-dom";
import InlineEdit from "../components/InlineEdit";
import InlineGroupEdit from "../components/InlineGroupEdit";
@@ -510,7 +510,7 @@ const Hosts = () => {
};
// Table filtering and sorting logic
const filteredAndSortedHosts = React.useMemo(() => {
const filteredAndSortedHosts = useMemo(() => {
if (!hosts) return [];
const filtered = hosts.filter((host) => {
@@ -629,7 +629,7 @@ const Hosts = () => {
]);
// Group hosts by selected field
const groupedHosts = React.useMemo(() => {
const groupedHosts = useMemo(() => {
if (groupBy === "none") {
return { "All Hosts": filteredAndSortedHosts };
}