2023-09-20 20:28:34 +00:00
|
|
|
import { Intent, TradingAnchorButton } from '@vegaprotocol/ui-toolkit';
|
|
|
|
import { GetStartedCheckList } from '../../components/welcome-dialog';
|
|
|
|
import {
|
|
|
|
useGetOnboardingStep,
|
|
|
|
useOnboardingStore,
|
|
|
|
OnboardingStep,
|
|
|
|
} from '../../components/welcome-dialog/use-get-onboarding-step';
|
|
|
|
import { Links } from '../../lib/links';
|
|
|
|
import classNames from 'classnames';
|
2023-11-16 03:10:39 +00:00
|
|
|
import { useT } from '../../lib/use-t';
|
2023-09-20 20:28:34 +00:00
|
|
|
|
|
|
|
export const DepositGetStarted = () => {
|
2023-11-16 03:10:39 +00:00
|
|
|
const t = useT();
|
2023-09-20 20:28:34 +00:00
|
|
|
const onboardingDismissed = useOnboardingStore((store) => store.dismissed);
|
|
|
|
const dismiss = useOnboardingStore((store) => store.dismiss);
|
|
|
|
const step = useGetOnboardingStep();
|
|
|
|
const wrapperClasses = classNames(
|
|
|
|
'flex flex-col py-4 px-6 gap-4 rounded',
|
|
|
|
'bg-vega-blue-300 dark:bg-vega-blue-700',
|
|
|
|
'border border-vega-blue-350 dark:border-vega-blue-650'
|
|
|
|
);
|
|
|
|
|
|
|
|
// Dont show unless still onboarding
|
|
|
|
if (onboardingDismissed) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div className="pt-6 border-t border-default">
|
|
|
|
<div className={wrapperClasses}>
|
|
|
|
<h3 className="text-lg">{t('Get started')}</h3>
|
|
|
|
<GetStartedCheckList />
|
|
|
|
{step > OnboardingStep.ONBOARDING_DEPOSIT_STEP && (
|
|
|
|
<TradingAnchorButton
|
|
|
|
href={Links.HOME()}
|
|
|
|
onClick={() => dismiss()}
|
|
|
|
intent={Intent.Info}
|
|
|
|
>
|
|
|
|
{t('Start trading')}
|
|
|
|
</TradingAnchorButton>
|
|
|
|
)}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|