Skip to content

Commit d58253d

Browse files
selbekkTimer
authored andcommitted
Removing sample pages (#5242)
* Remove "who uses this" callout on front page * Remove users and help pages * Add link to React's support docs Instead of removing the Help link altogether, this commit re-adds it as an external link to React's existing support documentation
1 parent 2a2e8bf commit d58253d

File tree

5 files changed

+13
-158
lines changed

5 files changed

+13
-158
lines changed

website/core/Footer.js

+8-7
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,19 @@ class Footer extends React.Component {
4646
</div>
4747
<div>
4848
<h5>Community</h5>
49-
<a href={this.pageUrl('users.html', this.props.language)}>
50-
User Showcase
51-
</a>
5249
<a
5350
href="http://stackoverflow.com/questions/tagged/"
5451
target="_blank"
55-
rel="noreferrer noopener">
52+
rel="noreferrer noopener"
53+
>
5654
Stack Overflow
5755
</a>
5856
<a href="https://discordapp.com/">Project Chat</a>
5957
<a
6058
href="https://twitter.com/"
6159
target="_blank"
62-
rel="noreferrer noopener">
60+
rel="noreferrer noopener"
61+
>
6362
Twitter
6463
</a>
6564
</div>
@@ -73,7 +72,8 @@ class Footer extends React.Component {
7372
data-count-href="/facebook/docusaurus/stargazers"
7473
data-show-count="true"
7574
data-count-aria-label="# stargazers on GitHub"
76-
aria-label="Star this project on GitHub">
75+
aria-label="Star this project on GitHub"
76+
>
7777
Star
7878
</a>
7979
</div>
@@ -83,7 +83,8 @@ class Footer extends React.Component {
8383
href="https://code.facebook.com/projects/"
8484
target="_blank"
8585
rel="noreferrer noopener"
86-
className="fbOpenSource">
86+
className="fbOpenSource"
87+
>
8788
<img
8889
src={`${this.props.config.baseUrl}img/oss_logo.png`}
8990
alt="Facebook Open Source"

website/pages/en/help.js

-58
This file was deleted.

website/pages/en/index.js

+4-28
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ const Block = props => (
9595
<Container
9696
padding={['bottom', 'top']}
9797
id={props.id}
98-
background={props.background}>
98+
background={props.background}
99+
>
99100
<GridBlock align="center" contents={props.children} layout={props.layout} />
100101
</Container>
101102
);
@@ -122,7 +123,8 @@ const Features = () => (
122123
const FeatureCallout = () => (
123124
<div
124125
className="productShowcaseSection paddingBottom"
125-
style={{textAlign: 'center'}}>
126+
style={{ textAlign: 'center' }}
127+
>
126128
<h2>Feature Callout</h2>
127129
<MarkdownBlock>These are features of this project</MarkdownBlock>
128130
</div>
@@ -167,31 +169,6 @@ const Description = () => (
167169
</Block>
168170
);
169171

170-
const Showcase = props => {
171-
if ((siteConfig.users || []).length === 0) {
172-
return null;
173-
}
174-
175-
const showcase = siteConfig.users.filter(user => user.pinned).map(user => (
176-
<a href={user.infoLink} key={user.infoLink}>
177-
<img src={user.image} alt={user.caption} title={user.caption} />
178-
</a>
179-
));
180-
181-
return (
182-
<div className="productShowcaseSection paddingBottom">
183-
<h2>Who is Using This?</h2>
184-
<p>This project is used by all these people</p>
185-
<div className="logos">{showcase}</div>
186-
<div className="more-users">
187-
<a className="button" href={pageUrl('users.html', props.language)}>
188-
More {siteConfig.title} Users
189-
</a>
190-
</div>
191-
</div>
192-
);
193-
};
194-
195172
class Index extends React.Component {
196173
render() {
197174
const language = this.props.language || '';
@@ -205,7 +182,6 @@ class Index extends React.Component {
205182
<LearnHow />
206183
<TryOut />
207184
<Description />
208-
<Showcase language={language} />
209185
</div>
210186
</div>
211187
);

website/pages/en/users.js

-49
This file was deleted.

website/siteConfig.js

+1-16
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,6 @@
88
// See https://docusaurus.io/docs/site-config for all the possible
99
// site configuration options.
1010

11-
// List of projects/orgs using your project for the users page.
12-
const users = [
13-
{
14-
caption: 'User1',
15-
// You will need to prepend the image path with your baseUrl
16-
// if it is not '/', like: '/test-site/img/docusaurus.svg'.
17-
image: '/img/docusaurus.svg',
18-
infoLink: 'https://www.facebook.com',
19-
pinned: true,
20-
},
21-
];
22-
2311
const siteConfig = {
2412
title: 'Create React App', // Title for your website.
2513
tagline: 'Create React apps with no build configuration.',
@@ -40,12 +28,9 @@ const siteConfig = {
4028
headerLinks: [
4129
{ doc: 'doc1', label: 'Docs' },
4230
{ doc: 'doc4', label: 'API' },
43-
{ page: 'help', label: 'Help' },
31+
{ href: 'https://reactjs.org/community/support.html', label: 'Help' },
4432
],
4533

46-
// If you have users set above, you add it here:
47-
users,
48-
4934
/* path to images for header/footer */
5035
headerIcon: 'img/docusaurus.svg',
5136
footerIcon: 'img/docusaurus.svg',

0 commit comments

Comments
 (0)