Add icons to buttons, supress delete error

This commit is contained in:
Piotr Rogowski 2022-10-14 14:21:11 +02:00
parent 3c29b6723e
commit d0bc89cc22
No known key found for this signature in database
GPG Key ID: 4A842D702D9C6F8F
3 changed files with 10 additions and 3 deletions

View File

@ -60,9 +60,9 @@ const useServerStorage = () => {
} catch (error) { } catch (error) {
Sentry.captureException(error); Sentry.captureException(error);
console.error(error); console.error(error);
genericError(error as Error);
return Promise.reject(error); // suppress error, may happen on mobile
return Promise.resolve();
} }
}; };

View File

@ -9,6 +9,7 @@ import {
Row, Row,
Select, Select,
} from 'antd'; } from 'antd';
import { EditOutlined } from '@ant-design/icons';
import { import {
generatePath, generatePath,
useNavigate, useNavigate,
@ -48,6 +49,7 @@ const Info = ({ tuneData }: { tuneData: TuneDataState }) => {
type="primary" type="primary"
block block
onClick={goToEdit} onClick={goToEdit}
icon={<EditOutlined />}
> >
Edit Edit
</Button> </Button>

View File

@ -27,6 +27,9 @@ import {
CopyOutlined, CopyOutlined,
ShareAltOutlined, ShareAltOutlined,
FileTextOutlined, FileTextOutlined,
EditOutlined,
CheckOutlined,
SendOutlined,
} from '@ant-design/icons'; } from '@ant-design/icons';
import * as Sentry from '@sentry/browser'; import * as Sentry from '@sentry/browser';
import { INI } from '@hyper-tuner/ini'; import { INI } from '@hyper-tuner/ini';
@ -127,7 +130,7 @@ const UploadPage = () => {
const noop = () => { }; const noop = () => { };
const goToNewTune = () => navigate(generatePath(Routes.TUNE_ROOT, { const goToNewTune = () => navigate(generatePath(Routes.TUNE_TUNE, {
tuneId: newTuneId!, tuneId: newTuneId!,
})); }));
@ -524,12 +527,14 @@ const UploadPage = () => {
block block
loading={isLoading} loading={isLoading}
htmlType="submit" htmlType="submit"
icon={isEditMode ? <EditOutlined /> : <CheckOutlined />}
> >
{isEditMode ? 'Update' : 'Publish'} {isEditMode ? 'Update' : 'Publish'}
</Button> : <Button </Button> : <Button
type="primary" type="primary"
block block
onClick={goToNewTune} onClick={goToNewTune}
icon={<SendOutlined />}
> >
Open Open
</Button>} </Button>}