Skip to content

Commit 1857737

Browse files
committed
improvement: hide Try It unless explicitly enabled
1 parent b4d5893 commit 1857737

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

website/apps/main.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ const Dialog = ({app, modal, toggleModal}) => {
6969
}
7070

7171
const tryItUrl = useMemo(() => {
72+
if (!location.search.includes('tryIt')) {
73+
return null;
74+
}
75+
7276
const url = new URL(tryItBaseUrl);
7377
url.hostname =
7478
"webapp-" +
@@ -115,7 +119,7 @@ const Dialog = ({app, modal, toggleModal}) => {
115119
<a href="${xdcget_export + "/" + app.cache_relname}" target="_blank" class="button">
116120
Add to Chat
117121
</a>
118-
<a class="button" target="_blank" href="${tryItUrl}">Try it</a>
122+
${tryItUrl && html`<a class="button" target="_blank" href="${tryItUrl}">Try it</a>`}
119123
<button class="ghost" onClick=${() => toggleModal(false)}>Close</button>
120124
</div>
121125
</dialog>

0 commit comments

Comments
 (0)