feat(client): ts-migrate footer (#42636)
Co-authored-by: Parth Parth <thecodingaviator@users.noreply.github.com>
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
7df4b87396
commit
61d1020dd7
@ -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', () => {
|
@ -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 (
|
@ -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 = ({
|
||||||
|
Reference in New Issue
Block a user