Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jun 2, 2023. It is now read-only.
/golangci-webPublic archive

Commitd075b2d

Browse files
committed
update message about the service closing
1 parent6d0f349 commitd075b2d

File tree

2 files changed

+70
-53
lines changed

2 files changed

+70
-53
lines changed

‎src/components/App.tsx‎

Lines changed: 69 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ interface IStateProps {
2626
interfaceIDispatchProps{}
2727
interfaceIOwnProps{}
2828

29-
interfaceIPropsextendsIStateProps,IDispatchProps,IOwnProps,RouteComponentProps<any>{}
29+
interfaceIProps
30+
extendsIStateProps,
31+
IDispatchProps,
32+
IOwnProps,
33+
RouteComponentProps<any>{}
3034

3135
classAppextendsReact.Component<IProps>{
3236
privaterenderContent(){
@@ -35,28 +39,24 @@ class App extends React.Component<IProps> {
3539
}
3640

3741
switch(this.props.lastApiHttpCode){
38-
case403:
39-
constisNotAuthorizedCode=this.props.lastApiErrorCode==="NOT_AUTHORIZED";
40-
if(this.props.currentUser&&isNotAuthorizedCode){
41-
returnthis.renderRevokedAccessTokenError();
42-
}
43-
44-
if(isNotAuthorizedCode){
45-
returnthis.renderNotAuthorizedError();
46-
}
42+
case403:
43+
constisNotAuthorizedCode=
44+
this.props.lastApiErrorCode==="NOT_AUTHORIZED";
45+
if(this.props.currentUser&&isNotAuthorizedCode){
46+
returnthis.renderRevokedAccessTokenError();
47+
}
48+
49+
if(isNotAuthorizedCode){
50+
returnthis.renderNotAuthorizedError();
51+
}
4752
}
4853

4954
returnthis.props.children;
5055
}
5156

5257
privaterenderCustomAlert(header:string,description:string):JSX.Element{
5358
return(
54-
<Alert
55-
message={header}
56-
description={description}
57-
type="error"
58-
showIcon
59-
/>
59+
<Alertmessage={header}description={description}type="error"showIcon/>
6060
);
6161
}
6262

@@ -110,42 +110,56 @@ class App extends React.Component<IProps> {
110110

111111
publicrender(){
112112
return(
113-
<>
114-
<Helmet>
115-
<metaproperty="og:locale"content="en_US"/>
116-
<metaproperty="og:site_name"content="golangci.com"/>
117-
<meta
118-
property="og:url"
119-
content={`${HOST}${this.props.location.pathname}${this.props.location.search}`}
120-
/>
121-
<metacharSet="utf-8"/>
122-
<metahttp-equiv="X-UA-Compatible"content="IE=edge"/>
123-
<metaname="viewport"content="width=device-width, initial-scale=1.0"/>
124-
</Helmet>
125-
126-
<LayoutclassName="layout">
127-
<Header/>
128-
<Layout.ContentclassName="content">
129-
<Alert
130-
message={`We are closing`}
131-
description={<>The service will stop working on 15-th of April, 2020. See<ahref="https://medium.com/golangci/golangci-com-is-closing-d1fc1bd30e0e">the blog post</a>.</>}
132-
type="warning"
133-
showIcon
113+
<>
114+
<Helmet>
115+
<metaproperty="og:locale"content="en_US"/>
116+
<metaproperty="og:site_name"content="golangci.com"/>
117+
<meta
118+
property="og:url"
119+
content={`${HOST}${this.props.location.pathname}${
120+
this.props.location.search
121+
}`}
122+
/>
123+
<metacharSet="utf-8"/>
124+
<metahttp-equiv="X-UA-Compatible"content="IE=edge"/>
125+
<meta
126+
name="viewport"
127+
content="width=device-width, initial-scale=1.0"
134128
/>
135-
{this.renderContent()}
136-
</Layout.Content>
137-
<Footer/>
138-
</Layout>
139-
140-
<ReduxToastr
141-
timeOut={4000}
142-
newestOnTop={false}
143-
preventDuplicates
144-
position="top-right"
145-
transitionIn="fadeIn"
146-
transitionOut="fadeOut"
147-
progressBar/>
148-
</>
129+
</Helmet>
130+
131+
<LayoutclassName="layout">
132+
<Header/>
133+
<Layout.ContentclassName="content">
134+
<Alert
135+
message={`We are closing`}
136+
description={
137+
<>
138+
We're sorry. The service{" "}
139+
<ahref="https://medium.com/golangci/golangci-com-is-closing-d1fc1bd30e0e">
140+
has stopped working
141+
</a>
142+
.
143+
</>
144+
}
145+
type="warning"
146+
showIcon
147+
/>
148+
{this.renderContent()}
149+
</Layout.Content>
150+
<Footer/>
151+
</Layout>
152+
153+
<ReduxToastr
154+
timeOut={4000}
155+
newestOnTop={false}
156+
preventDuplicates
157+
position="top-right"
158+
transitionIn="fadeIn"
159+
transitionOut="fadeOut"
160+
progressBar
161+
/>
162+
</>
149163
);
150164
}
151165
}
@@ -154,10 +168,12 @@ const mapStateToProps = (state: IAppStore): any => ({
154168
lastApiHttpCode:state.result ?state.result.lastApiResultHttpCode :null,
155169
lastApiErrorCode:state.result ?state.result.lastApiResultErrorCode :null,
156170
lastApiErrorMessage:state.result ?state.result.lastApiResultMessage :null,
157-
currentUser:state.auth.currentUser,
171+
currentUser:state.auth.currentUser
158172
});
159173

160-
letapp=withRouter(connect<IStateProps,IDispatchProps,IOwnProps>(mapStateToProps)(App));
174+
letapp=withRouter(
175+
connect<IStateProps,IDispatchProps,IOwnProps>(mapStateToProps)(App)
176+
);
161177

162178
if(__DEV__){
163179
app=hot(app);

‎tslint.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ rules:
99
"max-line-length":false
1010
"member-ordering":false
1111
"no-implicit-dependencies":false
12+
"trailing-comma":false

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp