Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sergei / chore: migrate open-positions to tsx #40

Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,19 @@ const ContractCardSell = ({ contract_info, getCardLabels, is_sell_requested, onC
ev.preventDefault();
};

if (!should_show_sell) return null;
if (!is_valid_to_sell)
return <div className='dc-contract-card__no-resale-msg'>{getCardLabels().RESALE_NOT_OFFERED}</div>;
return (
should_show_sell && (
<React.Fragment>
{is_valid_to_sell ? (
<Button
className={classNames('dc-btn--sell', {
'dc-btn--loading': is_sell_requested,
})}
is_disabled={is_sell_requested}
text={getCardLabels().SELL}
onClick={onClick}
secondary
/>
) : (
<div className='dc-contract-card__no-resale-msg'>{getCardLabels().RESALE_NOT_OFFERED}</div>
)}
</React.Fragment>
)
<Button
className={classNames('dc-btn--sell', {
'dc-btn--loading': is_sell_requested,
})}
is_disabled={is_sell_requested}
text={getCardLabels().SELL}
onClick={onClick}
secondary
/>
);
};

Expand Down
8 changes: 4 additions & 4 deletions packages/reports/src/Containers/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import OpenPositions from './open-positions.jsx';
import ProfitTable from './profit-table.jsx';
import Statement from './statement.jsx';
import Reports from './reports.jsx';
import OpenPositions from './open-positions';
import ProfitTable from './profit-table';
import Statement from './statement';
import Reports from './reports';

export default {
OpenPositions,
Expand Down
Loading