-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #780 When ssr:false don't even try SSR
- Loading branch information
Showing
4 changed files
with
45 additions
and
2 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
21 changes: 21 additions & 0 deletions
21
src/main/resources/lib/enonic/react4xp/React4xp/methods/renderWarningPlaceholder.ts
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import type { React4xp } from '/types'; | ||
|
||
|
||
export function renderWarningPlaceholder(this: React4xp) { | ||
const {jsxPath, react4xpId} = this; | ||
return `<div class="react4xp-warning"> | ||
<style> | ||
.react4xp-warning { | ||
background-color:#ffffb6; | ||
border: 1px solid #8b8b00; | ||
color: #000; | ||
font-family:monospace; | ||
font-size:12px; | ||
padding:1em; | ||
} | ||
</style> | ||
<p> | ||
This React4xp component "<strong>${jsxPath}</strong>" (with id <strong>${react4xpId}</strong>) is configured to be rendered client-side and is thus disabled in Content Studio edit mode. | ||
</p> | ||
</div>`; | ||
} |
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