aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/services
diff options
context:
space:
mode:
authorLibravatar kytwb <kytwb@pm.me>2021-12-19 15:43:09 +0100
committerLibravatar kytwb <kytwb@pm.me>2021-12-19 15:43:09 +0100
commit4b909b13fbb6d8d72ab38700b91cf18920d72fc4 (patch)
tree556d998e72ce71fb97bf89a65edaa0bb394964ae /src/components/services
parentIterate on About Ferdi screen (diff)
downloadferdium-app-4b909b13fbb6d8d72ab38700b91cf18920d72fc4.tar.gz
ferdium-app-4b909b13fbb6d8d72ab38700b91cf18920d72fc4.tar.zst
ferdium-app-4b909b13fbb6d8d72ab38700b91cf18920d72fc4.zip
Hotfix for requireAuthenticatedUser error
Diffstat (limited to 'src/components/services')
-rw-r--r--src/components/services/content/Services.js37
1 files changed, 2 insertions, 35 deletions
diff --git a/src/components/services/content/Services.js b/src/components/services/content/Services.js
index cbc70563d..9b43ea177 100644
--- a/src/components/services/content/Services.js
+++ b/src/components/services/content/Services.js
@@ -9,7 +9,6 @@ import injectSheet from 'react-jss';
9 9
10import ServiceView from './ServiceView'; 10import ServiceView from './ServiceView';
11import Appear from '../../ui/effects/Appear'; 11import Appear from '../../ui/effects/Appear';
12import serverlessLogin from '../../../helpers/serverless-helpers';
13 12
14const messages = defineMessages({ 13const messages = defineMessages({
15 getStarted: { 14 getStarted: {
@@ -52,7 +51,6 @@ class Services extends Component {
52 update: PropTypes.func.isRequired, 51 update: PropTypes.func.isRequired,
53 userHasCompletedSignup: PropTypes.bool.isRequired, 52 userHasCompletedSignup: PropTypes.bool.isRequired,
54 classes: PropTypes.object.isRequired, 53 classes: PropTypes.object.isRequired,
55 actions: PropTypes.object.isRequired,
56 isSpellcheckerEnabled: PropTypes.bool.isRequired, 54 isSpellcheckerEnabled: PropTypes.bool.isRequired,
57 }; 55 };
58 56
@@ -66,12 +64,6 @@ class Services extends Component {
66 64
67 _confettiTimeout = null; 65 _confettiTimeout = null;
68 66
69 constructor(props) {
70 super(props);
71
72 this.useLocalServer = this.useLocalServer.bind(this);
73 }
74
75 componentDidMount() { 67 componentDidMount() {
76 this._confettiTimeout = window.setTimeout(() => { 68 this._confettiTimeout = window.setTimeout(() => {
77 this.setState({ 69 this.setState({
@@ -86,10 +78,6 @@ class Services extends Component {
86 } 78 }
87 } 79 }
88 80
89 useLocalServer() {
90 serverlessLogin(this.props.actions);
91 }
92
93 render() { 81 render() {
94 const { 82 const {
95 services, 83 services,
@@ -108,7 +96,6 @@ class Services extends Component {
108 const { showConfetti } = this.state; 96 const { showConfetti } = this.state;
109 97
110 const { intl } = this.props; 98 const { intl } = this.props;
111 const isLoggedIn = Boolean(localStorage.getItem('authToken'));
112 99
113 return ( 100 return (
114 <div className="services"> 101 <div className="services">
@@ -129,33 +116,13 @@ class Services extends Component {
129 alt="Logo" 116 alt="Logo"
130 style={{ maxHeight: '50vh' }} 117 style={{ maxHeight: '50vh' }}
131 /> 118 />
132 {!isLoggedIn && (
133 <>
134 <p>{intl.formatMessage(messages.login)}</p>
135 <p>{intl.formatMessage(messages.serverInfo)}</p>
136 </>
137 )}
138 <Appear timeout={300} transitionName="slideUp"> 119 <Appear timeout={300} transitionName="slideUp">
139 <Link 120 <Link
140 to={isLoggedIn ? '/settings/recipes' : '/auth/welcome'} 121 to='/settings/recipes'
141 className="button" 122 className="button"
142 > 123 >
143 {isLoggedIn 124 {intl.formatMessage(messages.getStarted)}
144 ? intl.formatMessage(messages.getStarted)
145 : 'Login'}
146 </Link> 125 </Link>
147 {!isLoggedIn && (
148 <button
149 type="button"
150 className="button"
151 style={{
152 marginLeft: 10,
153 }}
154 onClick={this.useLocalServer}
155 >
156 {intl.formatMessage(messages.serverless)}
157 </button>
158 )}
159 </Appear> 126 </Appear>
160 </div> 127 </div>
161 </Appear> 128 </Appear>