Skip to content

Commit

Permalink
🐛 fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
NekoLyn committed Jul 1, 2024
1 parent 2dfa1a8 commit dd0c17a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
7 changes: 3 additions & 4 deletions src/components/search/InputWithSuggester.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,9 @@ const InputWithSuggester: React.FC<InputWithSuggesterProps> = ({
const [options, setOptions] = useState<OptionType[]>([]);
const [categorySet, setCategorySet] = useState<Category[]>([]);

const selectedCategories: Category[] = useSelector((state: RootState) =>
state.paramReducer.categories
? state.paramReducer.categories
: new Array<Category>()
const emptyArray: Category[] = [];
const selectedCategories: Category[] = useSelector(
(state: RootState) => state.paramReducer.categories || emptyArray
);

const searchInput = useSelector(
Expand Down
21 changes: 10 additions & 11 deletions src/components/smartpanel/ComplexSmartPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,21 @@ import { margin } from "../../styles/constants";
interface ComplexSmartPanelProps {
columns?: number;
rows?: number;
height: string;
height?: string;
bottomDivider?: boolean;
gridColumns: number;
gridColumns?: number;
sx?: SxProps<Theme>;
}
const defaultProps = {
columns: 9,
rows: 2,
gridColumns: 8,
height: "95px",
bottomDivider: false,
};

const ComplexSmartPanel = (
props: React.PropsWithChildren<ComplexSmartPanelProps>
props: React.PropsWithChildren<ComplexSmartPanelProps> = defaultProps
) => {
const boxRef = useRef<HTMLDivElement>(null);

Expand Down Expand Up @@ -110,12 +117,4 @@ const ComplexSmartPanel = (
);
};

ComplexSmartPanel.defaultProps = {
columns: 9,
rows: 2,
gridColumns: 8,
height: "95px",
bottomDivider: false,
};

export default ComplexSmartPanel;

0 comments on commit dd0c17a

Please sign in to comment.