-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JSS 12][React sample] Race condition, under load React app may rende…
…r HTML from a different route (#454)
- Loading branch information
1 parent
975651a
commit a933c3c
Showing
6 changed files
with
75 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,17 @@ | ||
import React from 'react'; | ||
import { RichText, withSitecoreContext } from '@sitecore-jss/sitecore-jss-react'; | ||
import { Text, RichText } from '@sitecore-jss/sitecore-jss-react'; | ||
|
||
/** | ||
* A simple Content Block component, with a heading and rich text block. | ||
* This is the most basic building block of a content site, and the most basic | ||
* JSS component that's useful. | ||
*/ | ||
const ContentBlock = ({ fields, sitecoreContext }) => ( | ||
const ContentBlock = ({ fields }) => ( | ||
<React.Fragment> | ||
<h2 className="display-5">WHAT is the airspeed velocity of an unladen swallow?</h2> | ||
<h2 className="display-5">African or European?</h2> | ||
{ sitecoreContext.pageEditing ? <marquee>I am an element that will only display in Experience Editor</marquee> : null } | ||
<Text tag="h2" className="display-4" field={fields.heading} /> | ||
|
||
|
||
<div style={{marginTop: 50}}> | ||
<RichText className="contentDescription" field={fields.content} /> | ||
</div> | ||
<RichText className="contentDescription" field={fields.content} /> | ||
</React.Fragment> | ||
); | ||
|
||
export default withSitecoreContext()(ContentBlock); | ||
export default ContentBlock; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.