Add icons to buttons, supress delete error
This commit is contained in:
parent
3c29b6723e
commit
d0bc89cc22
|
@ -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();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>}
|
||||||
|
|
Loading…
Reference in New Issue