Skip to content

Commit

Permalink
removed commented code and added default null value to props type
Browse files Browse the repository at this point in the history
  • Loading branch information
recondesigns committed Mar 5, 2024
1 parent 668444d commit f03f239
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions components/Nav/NavListItem/NavListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,7 @@ export type NavListItemPropsType = {
icon?: React.ReactElement | null;
};

NavListItem.defaultProps = {
sublinks: [],
icon: null,
};

function NavListItem({ sublinks, href, name, icon }: NavListItemPropsType) {
function NavListItem({ sublinks, href, name, icon = null }: NavListItemPropsType) {
const [areSublinksVisible, setSublinksVisible] = useState(false);

const handleKeyDown = (event: React.KeyboardEvent, indexKeyedOn: number) => {
Expand Down

0 comments on commit f03f239

Please sign in to comment.