Skip to content

Change to fast generate order #1525

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

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions frontend/src/basic/RobotPage/Welcome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import { Box, Button, Grid, Typography, useTheme } from '@mui/material';
import { RoboSatsTextIcon } from '../../components/Icons';
import { FastForward, RocketLaunch, Key } from '@mui/icons-material';
import { genBase62Token } from '../../utils';
import { UseAppStoreType, AppContext } from '../../contexts/AppContext';
import { UseFederationStoreType, FederationContext } from '../../contexts/FederationContext';
import { UseGarageStoreType, GarageContext } from '../../contexts/GarageContext';
import { useNavigate } from 'react-router-dom';
import { UseAppStoreType, AppContext } from '../../contexts/AppContext';

interface WelcomeProps {
setView: (state: 'welcome' | 'onboarding' | 'recovery' | 'profile') => void;
Expand All @@ -15,7 +16,9 @@ interface WelcomeProps {
}

const Welcome = ({ setView, width, setInputToken }: WelcomeProps): JSX.Element => {
const { setPage } = useContext<UseAppStoreType>(AppContext);
const { t } = useTranslation();
const navigate = useNavigate();
const theme = useTheme();
const { setOpen } = useContext<UseAppStoreType>(AppContext);
const { garage } = useContext<UseGarageStoreType>(GarageContext);
Expand Down Expand Up @@ -117,14 +120,15 @@ const Welcome = ({ setView, width, setInputToken }: WelcomeProps): JSX.Element =
size='small'
color='primary'
onClick={() => {
setView('profile');
const token = genBase62Token(36);
garage.createRobot(federation, token);
setInputToken(token);
navigate('/create');
setPage('create');
}}
>
<FastForward /> <div style={{ width: '0.5em' }} />
{t('Fast Generate Robot')}
{t('Fast Generate Order')}
</Button>
</Grid>
</Grid>
Expand Down
70 changes: 0 additions & 70 deletions frontend/static/assets/vector/buy-selected-icon-2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
84 changes: 0 additions & 84 deletions frontend/static/assets/vector/sell-icon-2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading