Skip to content

Commit

Permalink
Merge pull request #1525 from RoboSats/change-to-fast-generate-order
Browse files Browse the repository at this point in the history
Change to fast generate order
  • Loading branch information
KoalaSat authored Oct 18, 2024
2 parents 25f45be + da635ad commit c8de8c9
Show file tree
Hide file tree
Showing 21 changed files with 24 additions and 230 deletions.
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

0 comments on commit c8de8c9

Please sign in to comment.