2023-09-02 00:00:11 +00:00
|
|
|
import { TradingButton } from '@vegaprotocol/ui-toolkit';
|
2023-08-10 15:02:46 +00:00
|
|
|
import { ViewType, useSidebar } from '../sidebar';
|
2023-09-15 12:36:08 +00:00
|
|
|
import { useGetCurrentRouteId } from '../../lib/hooks/use-get-current-route-id';
|
2023-11-16 03:10:39 +00:00
|
|
|
import { useT } from '../../lib/use-t';
|
2023-08-10 15:02:46 +00:00
|
|
|
|
|
|
|
export const DepositsMenu = () => {
|
2023-11-16 03:10:39 +00:00
|
|
|
const t = useT();
|
2023-09-15 12:36:08 +00:00
|
|
|
const currentRouteId = useGetCurrentRouteId();
|
|
|
|
const setViews = useSidebar((store) => store.setViews);
|
2023-08-10 15:02:46 +00:00
|
|
|
|
|
|
|
return (
|
|
|
|
<TradingButton
|
|
|
|
size="extra-small"
|
2023-09-15 12:36:08 +00:00
|
|
|
onClick={() => setViews({ type: ViewType.Deposit }, currentRouteId)}
|
2023-08-10 15:02:46 +00:00
|
|
|
data-testid="deposit-button"
|
|
|
|
>
|
|
|
|
{t('Deposit')}
|
|
|
|
</TradingButton>
|
|
|
|
);
|
|
|
|
};
|