Skip to content

Commit

Permalink
type error fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kurund committed Dec 15, 2024
1 parent 273009f commit c43d12f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
2 changes: 1 addition & 1 deletion src/components/UI/ImgFallback/ImgFallback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type ImgProps = {

const ImgFallback = ({ src, alt, ...rest }: ImgProps) => {
const [imgSrc, setImgSrc] = useState<string>(src);
const imgRef: any = useRef<HTMLImageElement>();
const imgRef = useRef<HTMLImageElement>(null);

useEffect(() => {
setImgSrc(src);
Expand Down
12 changes: 0 additions & 12 deletions src/components/UI/ListIcon/ListIcon.test.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
import { MemoryRouter } from 'react-router';
import { render } from '@testing-library/react';

import ChatIcon from 'assets/images/icons/SideDrawer/ChatIcon';
import FlowIcon from 'assets/images/icons/SideDrawer/FlowIcon';
import SearchIcon from 'assets/images/icons/SideDrawer/SearchIcon';
import SpeedSendIcon from 'assets/images/icons/SideDrawer/SpeedSendIcon';
import TemplateIcon from 'assets/images/icons/SideDrawer/TemplateIcon';
import { ListIcon } from './ListIcon';

describe('list icon tests', () => {
const iconList: { [iconName: string]: (color: { color: any }) => JSX.Element } = {
chat: ChatIcon,
flow: FlowIcon,
search: SearchIcon,
'speed-send': SpeedSendIcon,
template: TemplateIcon,
};
const createIcon = (type: string) => (
<MemoryRouter>
<ListIcon icon={type} />
Expand Down

0 comments on commit c43d12f

Please sign in to comment.