f377e07996
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
19 lines
586 B
TypeScript
19 lines
586 B
TypeScript
import { TradingButton } from '@vegaprotocol/ui-toolkit';
|
|
import { usePositionsStore } from '../positions-container';
|
|
import { useT } from '../../lib/use-t';
|
|
|
|
export const PositionsMenu = () => {
|
|
const t = useT();
|
|
const showClosed = usePositionsStore((store) => store.showClosedMarkets);
|
|
const toggle = usePositionsStore((store) => store.toggleClosedMarkets);
|
|
return (
|
|
<TradingButton
|
|
size="extra-small"
|
|
data-testid="open-transfer"
|
|
onClick={toggle}
|
|
>
|
|
{showClosed ? t('Hide closed markets') : t('Show closed markets')}
|
|
</TradingButton>
|
|
);
|
|
};
|