feat(client): ts-migrate footer (#42636)

Co-authored-by: Parth Parth <thecodingaviator@users.noreply.github.com>
This commit is contained in:
Parth Parth
2021-06-29 03:15:39 +05:30
committed by Mrugesh Mohapatra
parent 7df4b87396
commit 61d1020dd7
4 changed files with 7 additions and 9 deletions

View File

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import renderer from 'react-test-renderer'; import renderer from 'react-test-renderer';
import Footer from './'; import Footer from '.';
describe('<Footer />', () => { describe('<Footer />', () => {
it('matches snapshot', () => { it('matches snapshot', () => {

View File

@ -1,21 +1,21 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import Link from '../helpers/link'; import Link from '../helpers/link';
import './footer.css'; import './footer.css';
const propTypes = { type ColHeaderProps = {
children: PropTypes.any children: string | React.ReactNode | React.ReactElement;
}; };
const ColHeader = ({ children, ...other }) => ( // TODO: Figure out what ColHeader does: 'ColHeader' is declared but its value is never read.
// eslint-disable-next-line
const ColHeader = ({ children, ...other }: ColHeaderProps): JSX.Element => (
<div className='col-header' {...other}> <div className='col-header' {...other}>
{children} {children}
</div> </div>
); );
ColHeader.propTypes = propTypes;
function Footer() { function Footer(): JSX.Element {
const { t } = useTranslation(); const { t } = useTranslation();
return ( return (

View File

@ -8,8 +8,6 @@ interface LinkProps {
sameTab?: boolean; sameTab?: boolean;
state?: Record<string, unknown>; state?: Record<string, unknown>;
to: string; to: string;
// TODO: figure out what these actually should be
other?: unknown[];
} }
const Link = ({ const Link = ({