Skip to content

Commit b7cfce5

Browse files
committed
More home page tweaks
1 parent 7da7302 commit b7cfce5

File tree

2 files changed

+23
-28
lines changed

2 files changed

+23
-28
lines changed

src/Feature/index.tsx

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,33 @@ export function Feature(props: { children: React.ReactNode }): JSX.Element {
2525

2626
const children = React.Children.toArray(props.children);
2727

28-
const describer = children.filter(
28+
const describerArray = children.filter(
2929
(x) => isValidElement(x) && x.type === Feature.Describer
30-
)[0];
31-
const visual = children.filter(
30+
);
31+
const visualArray = children.filter(
3232
(x) => isValidElement(x) && x.type === Feature.Visual
33-
)[0];
33+
);
3434

35-
if (sideContext.valueOf()) {
35+
if (visualArray.length === 0 && describerArray.length === 2) {
36+
return (
37+
<>
38+
<div className={classnames("col", "col--6")}>{describerArray[0]}</div>
39+
<div className={classnames("col", "col--6")}>{describerArray[1]}</div>
40+
</>
41+
);
42+
} else if (sideContext.valueOf()) {
3643
return (
3744
<>
38-
<div className={classnames("col", "col--6")}>{describer}</div>
39-
<div className={classnames("col", "col--6")}>{visual}</div>
45+
<div className={classnames("col", "col--6")}>{describerArray[0]}</div>
46+
<div className={classnames("col", "col--6")}>{visualArray[0]}</div>
4047
</>
4148
);
4249
} else {
4350
return (
4451
<>
45-
<div className={classnames("col", "col--6")}>{visual}</div>
52+
<div className={classnames("col", "col--6")}>{visualArray[0]}</div>
4653
<div className={classnames("col", "col--6", styles.reorder)}>
47-
{describer}
54+
{describerArray[0]}
4855
</div>
4956
</>
5057
);

src/pages/index.tsx

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ function Home() {
6868
<Feature.Describer>
6969
<h2>The trusted Epic Online Services integration</h2>
7070
<p>
71-
Developed since the initial launch of Epic Online Services,
72-
and with over 3,000 developers and millions of players
73-
worldwide, Redpoint EOS Online Framework is the professional
74-
solution for game developers integrating Epic Online
75-
Services into Unreal Engine games.
71+
Developed since the launch of Epic Online Services, and with
72+
over 3,000 developers and millions of players worldwide,
73+
Redpoint EOS Online Framework is the professional solution
74+
for game developers integrating Epic Online Services into
75+
Unreal Engine games.
7676
</p>
7777
<p>
7878
Our plugin is used everywhere - from the smallest indie
@@ -118,13 +118,6 @@ function Home() {
118118
done for desktop, mobile and console platforms.
119119
</p>
120120
</Feature.Describer>
121-
<Feature.Visual>
122-
<a href="#" target="_blank">
123-
<img src="#" className={classnames(styles.featureImage)} />
124-
</a>
125-
</Feature.Visual>
126-
</Feature>
127-
<Feature>
128121
<Feature.Describer>
129122
<h2>Full console support</h2>
130123
<p>
@@ -136,15 +129,10 @@ function Home() {
136129
avatars in-game.
137130
</p>
138131
<p>
139-
With EOS Online Framework, you get to focus on building your
140-
game, not on console-specific code.
132+
With EOS Online Framework, you get to focus more on building
133+
your game and less on platform-specific code.
141134
</p>
142135
</Feature.Describer>
143-
<Feature.Visual>
144-
<a href="#" target="_blank">
145-
<img src="#" className={classnames(styles.featureImage)} />
146-
</a>
147-
</Feature.Visual>
148136
</Feature>
149137
<Feature>
150138
<Feature.Describer>

0 commit comments

Comments
 (0)