Skip to content

Commit

Permalink
remove unused vars
Browse files Browse the repository at this point in the history
  • Loading branch information
dbadura committed Jan 31, 2025
1 parent 71e46e7 commit a73c398
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/components/CustomResources/CustomResources.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function CustomResources({
}) {
const { group, names } = crd.spec;
const name = names.plural;
const customUrl = useCustomResourceUrl(crd, true);
const customUrl = useCustomResourceUrl(crd);
const { namespace } = useUrl();
const resourceUrl =
namespace && namespace !== '-all-'
Expand Down
7 changes: 1 addition & 6 deletions src/resources/CustomResourceDefinitions/CRCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,7 @@ function CRCreate({
const [initialResource] = useState(
initialCustomResource || createTemplate(crd),
);
const currUrl = window.location.href;

const customUrl = useCustomResourceUrl(
crd,
currUrl.includes('customresources/'),
);
const customUrl = useCustomResourceUrl(crd);

const navigate = useNavigate();
const { nextQuery, currentQuery } = usePrepareLayout(layoutNumber);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { useRecoilValue } from 'recoil';
import { allNodesSelector } from 'state/navigation/allNodesSelector';
import { useUrl } from 'hooks/useUrl';

export function useCustomResourceUrl(crd, columnLayout = false) {
const { resourceUrl, clusterUrl, namespaceUrl } = useUrl();
export function useCustomResourceUrl(crd) {
const { clusterUrl, namespaceUrl } = useUrl();
const clusterNodes = useRecoilValue(allNodesSelector).filter(
node => !node.namespaced,
);
Expand Down

0 comments on commit a73c398

Please sign in to comment.