I'm new in JS. I created table with checkbox row. Now I wanna test it. But I get error in my index.js file.
My code
import React from 'react';
import { Spin, Table } from 'antd';
import { useFetch } from 'innroad.common.ui';
import * as apiService from 'services/ApiService';
const AccountType = (onSelectingItems) => {
const [data, isLoading] = useFetch(apiService.accountType);
return (
<Spin spinning={isLoading}>
<Table
key="id"
bordered="true"
rowKey="id"
dataSource={data}
rowSelection={{ onChange: onSelectingItems }}
pagination={false}
>
<Table.Column title="Account Type" dataIndex="accountType" />
</Table>
</Spin>
);
};
/* AccountType.propTypes = {
selectionType: PropTypes.string,
onSelectingLineItems: PropTypes.func,
}; */
AccountType.defaultProps = {
selectionType: 'checkbox',
onSelectingLineItems: () => { },
};
export default AccountType;
And one question more: should I use AccountType.propTypes - commented block? If yes, how I need change it? Because now I get error in this block - that I declare but didn't use.
Index.JS (Here is error)
export { default } from './AccountType';
Expected linebreaks to be 'LF' but found 'CRLF'.eslintlinebreak-style after ";"


