Skip to content

Commit f595f38

Browse files
committed
Update RTK link and format
1 parent f71dd4c commit f595f38

File tree

1 file changed

+69
-51
lines changed

1 file changed

+69
-51
lines changed

website/pages/en/index.js

Lines changed: 69 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -5,87 +5,99 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
const React = require("react");
8+
const React = require('react')
99

10-
const CompLibrary = require("../../core/CompLibrary.js");
10+
const CompLibrary = require('../../core/CompLibrary.js')
1111

12-
const {MarkdownBlock, GridBlock, Container} = CompLibrary; /* Used to read markdown */
12+
const {
13+
MarkdownBlock,
14+
GridBlock,
15+
Container
16+
} = CompLibrary /* Used to read markdown */
1317

14-
const siteConfig = require(`${process.cwd()}/siteConfig.js`);
18+
const siteConfig = require(`${process.cwd()}/siteConfig.js`)
1519

1620
function docUrl(doc, language) {
17-
return `${siteConfig.baseUrl}${language ? `${language}/` : ""}${doc}`;
21+
return `${siteConfig.baseUrl}${language ? `${language}/` : ''}${doc}`
1822
}
1923

2024
function imgUrl(img) {
21-
return `${siteConfig.baseUrl}img/${img}`;
25+
return `${siteConfig.baseUrl}img/${img}`
2226
}
2327
class Button extends React.Component {
2428
render() {
2529
return (
2630
<div className="pluginWrapper buttonWrapper">
27-
<a className="button hero" href={this.props.href} target={this.props.target}>
31+
<a
32+
className="button hero"
33+
href={this.props.href}
34+
target={this.props.target}
35+
>
2836
{this.props.children}
2937
</a>
3038
</div>
31-
);
39+
)
3240
}
3341
}
3442

3543
Button.defaultProps = {
36-
target: "_self"
37-
};
44+
target: '_self'
45+
}
3846

3947
const SplashContainer = props => (
4048
<div className="homeContainer">
4149
<div className="homeSplashFade">
4250
<div className="wrapper homeWrapper">{props.children}</div>
4351
</div>
4452
</div>
45-
);
53+
)
4654

4755
const Logo = props => (
4856
<div className="projectLogo">
4957
<img src={props.img_src} alt="Project Logo" />
5058
</div>
51-
);
59+
)
5260

5361
const ProjectTitle = () => (
5462
<React.Fragment>
55-
<div style={{display : "flex", justifyContent : "center", alignItems : "center"}}>
56-
<img src={"img/redux.svg"} alt="Redux logo" width={100} height={100}/>
63+
<div
64+
style={{
65+
display: 'flex',
66+
justifyContent: 'center',
67+
alignItems: 'center'
68+
}}
69+
>
70+
<img src={'img/redux.svg'} alt="Redux logo" width={100} height={100} />
5771
<h1 className="projectTitle">{siteConfig.title}</h1>
5872
</div>
5973

60-
<h2 style={{marginTop : "0.5em"}}>
61-
Official React bindings for Redux
62-
</h2>
63-
</React.Fragment>
64-
);
74+
<h2 style={{ marginTop: '0.5em' }}>Official React bindings for Redux</h2>
75+
</React.Fragment>
76+
)
6577

6678
const PromoSection = props => (
6779
<div className="section promoSection">
6880
<div className="promoRow">
6981
<div className="pluginRowBlock">{props.children}</div>
7082
</div>
7183
</div>
72-
);
84+
)
7385

7486
class HomeSplash extends React.Component {
7587
render() {
76-
const language = this.props.language || "";
88+
const language = this.props.language || ''
7789
return (
7890
<SplashContainer>
7991
<div className="inner">
8092
<ProjectTitle />
8193
<PromoSection>
82-
<Button href={docUrl("introduction/quick-start", language)}>
94+
<Button href={docUrl('introduction/quick-start', language)}>
8395
Get Started
8496
</Button>
8597
</PromoSection>
8698
</div>
8799
</SplashContainer>
88-
);
100+
)
89101
}
90102
}
91103

@@ -95,60 +107,66 @@ const Block = props => (
95107
background={props.background}
96108
className={props.className}
97109
>
98-
<GridBlock align="center" contents={props.children} layout={props.layout}/>
110+
<GridBlock align="center" contents={props.children} layout={props.layout} />
99111
</Container>
100-
);
112+
)
101113

102114
const FeaturesTop = props => (
103115
<Block layout="fourColumn" className="featureBlock">
104116
{[
105117
{
106-
content: "React Redux is maintained by the Redux team, and **kept up-to-date with the latest APIs from Redux and React**.",
107-
image : imgUrl("noun_Certificate_1945625.svg"),
118+
content:
119+
'React Redux is maintained by the Redux team, and **kept up-to-date with the latest APIs from Redux and React**.',
120+
image: imgUrl('noun_Certificate_1945625.svg'),
108121
imageAlign: 'top',
109-
title: "Official"
122+
title: 'Official'
110123
},
111124
{
112-
content: "**Designed to work with React's component model**. You define how to extract the values your component needs from Redux, and your component receives them as props.",
113-
image : imgUrl("noun_Check_1870817.svg"),
125+
content:
126+
"**Designed to work with React's component model**. You define how to extract the values your component needs from Redux, and your component receives them as props.",
127+
image: imgUrl('noun_Check_1870817.svg'),
114128
imageAlign: 'top',
115-
title: "Predictable"
129+
title: 'Predictable'
116130
},
117131
{
118-
content: "Creates wrapper components that **manage the store interaction logic for you**, so you don't have to write it yourself.",
119-
image : imgUrl("noun_Box_1664404.svg"),
132+
content:
133+
"Creates wrapper components that **manage the store interaction logic for you**, so you don't have to write it yourself.",
134+
image: imgUrl('noun_Box_1664404.svg'),
120135
imageAlign: 'top',
121-
title: "Encapsulated"
136+
title: 'Encapsulated'
122137
},
123138
{
124-
content: "Automatically implements **complex performance optimizations**, so that your own component only re-renders when the data it needs has actually changed.",
125-
image : imgUrl("noun_Rocket_1245262.svg"),
139+
content:
140+
'Automatically implements **complex performance optimizations**, so that your own component only re-renders when the data it needs has actually changed.',
141+
image: imgUrl('noun_Rocket_1245262.svg'),
126142
imageAlign: 'top',
127-
title: "Optimized"
128-
},
143+
title: 'Optimized'
144+
}
129145
]}
130146
</Block>
131-
);
147+
)
132148

133149
const OtherLibraries = props => (
134150
<Block layout="twoColumn" className="libBlock">
135151
{[
136152
{
137-
content: "A predictable state container for JavaScript applications",
138-
title: "[Redux ![link2](img/external-link-square-alt-solid.svg)](https://redux.js.org) "
153+
content: 'A predictable state container for JavaScript applications',
154+
title:
155+
'[Redux ![link2](img/external-link-square-alt-solid.svg)](https://redux.js.org) '
139156
},
140157
{
141-
content: "A simple batteries-included toolset to make using Redux easier",
142-
title: "[Redux Starter Kit ![link2](img/external-link-square-alt-solid.svg)](https://redux-starter-kit.js.org)"
143-
},
158+
content:
159+
'The official, opinionated, batteries-included toolset for efficient Redux development',
160+
title:
161+
'[Redux Toolkit ![link2](img/external-link-square-alt-solid.svg)](https://redux-toolkit.js.org)'
162+
}
144163
]}
145164
</Block>
146-
);
147-
165+
)
148166

149167
class Index extends React.Component {
150168
render() {
151-
const language = this.props.language || "";
169+
const language = this.props.language || ''
152170

153171
return (
154172
<div>
@@ -159,16 +177,16 @@ class Index extends React.Component {
159177
<FeaturesTop />
160178
</Container>
161179
<Container>
162-
<h2 style={{marginTop : "0.5em"}}>
180+
<h2 style={{ marginTop: '0.5em' }}>
163181
Other Libraries from the Redux Team
164182
</h2>
165-
<OtherLibraries/>
183+
<OtherLibraries />
166184
</Container>
167185
</div>
168186
</div>
169187
</div>
170-
);
188+
)
171189
}
172190
}
173191

174-
module.exports = Index;
192+
module.exports = Index

0 commit comments

Comments
 (0)