Skip to content

Commit

Permalink
Refs #36793 - lint
Browse files Browse the repository at this point in the history
  • Loading branch information
parthaa committed Oct 25, 2023
1 parent 2ad7ece commit e0cdd35
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ import { useAPI } from '../../common/hooks/API/APIHooks';
import TabRouter from './Tabs/TabRouter';
import RedirectToEmptyHostPage from './EmptyState';
import BreadcrumbBar from '../BreadcrumbBar';
import { foremanUrl } from '../../common/helpers';
import { CardExpansionContextWrapper } from './CardExpansionContext';
import Head from '../Head';
import { useForemanSettings, useForemanHostsPageUrl } from '../../Root/Context/ForemanContext';
import {
useForemanSettings,
useForemanHostsPageUrl,
} from '../../Root/Context/ForemanContext';

const HostDetails = ({
match: {
Expand Down Expand Up @@ -113,8 +115,7 @@ const HostDetails = ({
switcherItemUrl: '/new/hosts/:name',
}}
breadcrumbItems={[
{ caption: __('Hosts'),
url: useForemanHostsPageUrl() },
{ caption: __('Hosts'), url: useForemanHostsPageUrl() },

Check failure on line 118 in webpack/assets/javascripts/react_app/components/HostDetails/index.js

View workflow job for this annotation

GitHub Actions / test (12)

React Hook "useForemanHostsPageUrl" is called conditionally. React Hooks must be called in the exact same order in every component render. Did you accidentally call a React Hook after an early return?

Check failure on line 118 in webpack/assets/javascripts/react_app/components/HostDetails/index.js

View workflow job for this annotation

GitHub Actions / test (14)

React Hook "useForemanHostsPageUrl" is called conditionally. React Hooks must be called in the exact same order in every component render. Did you accidentally call a React Hook after an early return?
{
caption: displayFqdnForHosts
? response.name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class ReactConnectedSet extends Set {
export const useSet = initialArry => {
const [, setToggle] = useState(Date.now());
// needed because mutating a Ref won't cause React to rerender
const forceRender = () => setToggle(Symbol());
const forceRender = () => setToggle(Symbol("useSet"));

Check failure on line 57 in webpack/assets/javascripts/react_app/components/PF4/TableIndexPage/Table/TableHooks.js

View workflow job for this annotation

GitHub Actions / test (12)

Replace `"useSet"` with `'useSet'`

Check failure on line 57 in webpack/assets/javascripts/react_app/components/PF4/TableIndexPage/Table/TableHooks.js

View workflow job for this annotation

GitHub Actions / test (14)

Replace `"useSet"` with `'useSet'`
const set = useRef(new ReactConnectedSet(initialArry, forceRender));
return set.current;
};
Expand Down

0 comments on commit e0cdd35

Please sign in to comment.