Skip to content

Commit

Permalink
fix(Nav): omit <boolean> in useState
Browse files Browse the repository at this point in the history
  • Loading branch information
adamviktora committed Aug 18, 2023
1 parent eb294c5 commit ae32e9c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions packages/react-core/src/demos/examples/Nav/NavHorizontal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ import imgAvatar from '@patternfly/react-core/src/components/Avatar/examples/ava
import pfLogo from '@patternfly/react-core/src/demos/assets/pf-logo.svg';

export const PageLayoutHorizontalNav: React.FunctionComponent = () => {
const [isDropdownOpen, setIsDropdownOpen] = React.useState<boolean>(false);
const [isKebabDropdownOpen, setIsKebabDropdownOpen] = React.useState<boolean>(false);
const [isFullKebabDropdownOpen, setIsFullKebabDropdownOpen] = React.useState<boolean>(false);
const [isDropdownOpen, setIsDropdownOpen] = React.useState(false);
const [isKebabDropdownOpen, setIsKebabDropdownOpen] = React.useState(false);
const [isFullKebabDropdownOpen, setIsFullKebabDropdownOpen] = React.useState(false);
const [activeItem, setActiveItem] = React.useState<string | number>(0);

const onNavSelect = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ import imgAvatar from '@patternfly/react-core/src/components/Avatar/examples/ava
import pfLogo from '@patternfly/react-core/src/demos/assets/pf-logo.svg';

export const HorizontalNavWithSubnav: React.FunctionComponent = () => {
const [isDropdownOpen, setIsDropdownOpen] = React.useState<boolean>(false);
const [isKebabDropdownOpen, setIsKebabDropdownOpen] = React.useState<boolean>(false);
const [isFullKebabDropdownOpen, setIsFullKebabDropdownOpen] = React.useState<boolean>(false);
const [isDropdownOpen, setIsDropdownOpen] = React.useState(false);
const [isKebabDropdownOpen, setIsKebabDropdownOpen] = React.useState(false);
const [isFullKebabDropdownOpen, setIsFullKebabDropdownOpen] = React.useState(false);
const [activeItem, setActiveItem] = React.useState<string | number>(0);
const [activeSubNavItem, setActiveSubNavItem] = React.useState<string | number>(7);

Expand Down
12 changes: 6 additions & 6 deletions packages/react-core/src/demos/examples/Nav/NavManual.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ import imgAvatar from '@patternfly/react-core/src/components/Avatar/examples/ava
import pfLogo from '@patternfly/react-core/src/demos/assets/pf-logo.svg';

export const PageLayoutManualNav: React.FunctionComponent = () => {
const [isDropdownOpen, setIsDropdownOpen] = React.useState<boolean>(false);
const [isKebabDropdownOpen, setIsKebabDropdownOpen] = React.useState<boolean>(false);
const [isFullKebabDropdownOpen, setIsFullKebabDropdownOpen] = React.useState<boolean>(false);
const [isMobileView, setIsMobileView] = React.useState<boolean>(false);
const [isSidebarOpenDesktop, setIsSidebarOpenDesktop] = React.useState<boolean>(true);
const [isSidebarOpenMobile, setIsSidebarOpenMobile] = React.useState<boolean>(false);
const [isDropdownOpen, setIsDropdownOpen] = React.useState(false);
const [isKebabDropdownOpen, setIsKebabDropdownOpen] = React.useState(false);
const [isFullKebabDropdownOpen, setIsFullKebabDropdownOpen] = React.useState(false);
const [isMobileView, setIsMobileView] = React.useState(false);
const [isSidebarOpenDesktop, setIsSidebarOpenDesktop] = React.useState(true);
const [isSidebarOpenMobile, setIsSidebarOpenMobile] = React.useState(false);
const [activeItem, setActiveItem] = React.useState<string | number>(0);

const onNavSelect = (
Expand Down

0 comments on commit ae32e9c

Please sign in to comment.