This file contains hidden or 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
| var Counter = React.createClass({ | |
| getInitialState: function() { | |
| return {secondsElapsed: 0}; | |
| }, | |
| tick: function() { | |
| this.setState({secondsElapsed: this.state.secondsElapsed + 1}); | |
| }, | |
| componentDidMount: function() { | |
| this.interval = setInterval(this.tick, 1000); | |
| }, |
This file contains hidden or 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
| using Newtonsoft.Json.Linq; | |
| using Sitecore; | |
| using Sitecore.Data.Items; | |
| using Sitecore.Diagnostics; | |
| using Sitecore.LayoutService.Configuration; | |
| using Sitecore.LayoutService.ItemRendering; | |
| using Sitecore.Links; | |
| using Sitecore.Mvc.Presentation; | |
| namespace Nomad.Jss.CodeFirst.ItemRendering |
This file contains hidden or 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
| import React from 'react'; | |
| import { Head } from 'next/document'; | |
| import { cleanAmpPath } from 'next/dist/next-server/server/utils' | |
| function getOptionalModernScriptVariant(path: string) { | |
| if (process.env.__NEXT_MODERN_BUILD) { | |
| return path.replace(/\.js$/, '.module.js') | |
| } | |
| return path | |
| } |
OlderNewer