diff options
author | 2022-11-19 15:21:09 +0530 | |
---|---|---|
committer | 2022-11-19 09:51:09 +0000 | |
commit | a051331680b21f20201a47601d69505a4cfa9e40 (patch) | |
tree | f98dd4bc668c9814d58c0e49170aeeb19c2fe1de /src/components/settings/services/ServiceError.js | |
parent | 6.2.1-nightly.46 [skip ci] (diff) | |
download | ferdium-app-a051331680b21f20201a47601d69505a4cfa9e40.tar.gz ferdium-app-a051331680b21f20201a47601d69505a4cfa9e40.tar.zst ferdium-app-a051331680b21f20201a47601d69505a4cfa9e40.zip |
Transform service components to ts (#778)
Diffstat (limited to 'src/components/settings/services/ServiceError.js')
-rw-r--r-- | src/components/settings/services/ServiceError.js | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/src/components/settings/services/ServiceError.js b/src/components/settings/services/ServiceError.js deleted file mode 100644 index fdcdb54c9..000000000 --- a/src/components/settings/services/ServiceError.js +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import { Link } from 'react-router-dom'; | ||
4 | import { defineMessages, injectIntl } from 'react-intl'; | ||
5 | |||
6 | import Infobox from '../../ui/Infobox'; | ||
7 | import Button from '../../ui/button'; | ||
8 | |||
9 | const messages = defineMessages({ | ||
10 | headline: { | ||
11 | id: 'settings.service.error.headline', | ||
12 | defaultMessage: 'Error', | ||
13 | }, | ||
14 | goBack: { | ||
15 | id: 'settings.service.error.goBack', | ||
16 | defaultMessage: 'Back to services', | ||
17 | }, | ||
18 | availableServices: { | ||
19 | id: 'settings.service.form.availableServices', | ||
20 | defaultMessage: 'Available services', | ||
21 | }, | ||
22 | errorMessage: { | ||
23 | id: 'settings.service.error.message', | ||
24 | defaultMessage: 'Could not load service recipe.', | ||
25 | }, | ||
26 | }); | ||
27 | |||
28 | class ServiceError extends Component { | ||
29 | render() { | ||
30 | const { intl } = this.props; | ||
31 | |||
32 | return ( | ||
33 | <div className="settings__main"> | ||
34 | <div className="settings__header"> | ||
35 | <span className="settings__header-item"> | ||
36 | <Link to="/settings/recipes"> | ||
37 | {intl.formatMessage(messages.availableServices)} | ||
38 | </Link> | ||
39 | </span> | ||
40 | <span className="separator" /> | ||
41 | <span className="settings__header-item"> | ||
42 | {intl.formatMessage(messages.headline)} | ||
43 | </span> | ||
44 | </div> | ||
45 | <div className="settings__body"> | ||
46 | <Infobox type="danger" icon="alert"> | ||
47 | {intl.formatMessage(messages.errorMessage)} | ||
48 | </Infobox> | ||
49 | </div> | ||
50 | <div className="settings__controls"> | ||
51 | <Button | ||
52 | label={intl.formatMessage(messages.goBack)} | ||
53 | htmlForm="form" | ||
54 | onClick={() => window.history.back()} | ||
55 | /> | ||
56 | </div> | ||
57 | </div> | ||
58 | ); | ||
59 | } | ||
60 | } | ||
61 | |||
62 | export default injectIntl(observer(ServiceError)); | ||