Skip to content

Commit 0af238a

Browse files
Copilotideag
andauthored
Replace overlay buttons with tinyRelated, tinyRating, tinyEvent
Agent-Logs-Url: https://github.com/tinypluginlabs/demo/sessions/5499b284-bb12-46aa-9388-a1fd4b29e748 Co-authored-by: ideag <3252474+ideag@users.noreply.github.com>
1 parent ea68789 commit 0af238a

1 file changed

Lines changed: 15 additions & 21 deletions

File tree

  • packages/playground/website/src/components/saved-playgrounds-overlay

packages/playground/website/src/components/saved-playgrounds-overlay/index.tsx

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,6 @@ interface SavedPlaygroundsOverlayProps {
6565
initialViewMode?: OverlayViewMode;
6666
}
6767

68-
function PullRequestIcon() {
69-
return (
70-
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
71-
<path d="M1.5 3.25a2.25 2.25 0 1 1 3 2.122v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.25 2.25 0 0 1 1.5 3.25Zm5.677-.177L9.573.677A.25.25 0 0 1 10 .854V2.5h1A2.5 2.5 0 0 1 13.5 5v5.628a2.251 2.251 0 1 1-1.5 0V5a1 1 0 0 0-1-1h-1v1.646a.25.25 0 0 1-.427.177L7.177 3.427a.25.25 0 0 1 0-.354ZM3.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm0 9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm8.25.75a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Z" />
72-
</svg>
73-
);
74-
}
75-
7668
function GridIcon({ size = 20 }: { size?: number }) {
7769
return (
7870
<svg width={size} height={size} viewBox="0 0 16 16" fill="currentColor">
@@ -291,29 +283,31 @@ export function SavedPlaygroundsOverlay({
291283

292284
const creationOptions = [
293285
{
294-
id: 'vanilla',
295-
title: 'Vanilla WordPress',
286+
id: 'tinyrelated',
287+
title: 'tinyRelated',
296288
iconComponent: <WordPressIcon />,
297-
onClick: createVanillaSite,
289+
onClick: () => {
290+
window.location.href = '/tinyrelated';
291+
},
298292
disabled: false,
299293
},
300294
{
301-
id: 'wp-pr',
302-
title: 'WordPress PR',
303-
iconComponent: <PullRequestIcon />,
295+
id: 'tinyrating',
296+
title: 'tinyRating',
297+
iconComponent: <WordPressIcon />,
304298
onClick: () => {
305-
modalDispatch(setActiveModal(modalSlugs.PREVIEW_PR_WP));
299+
window.location.href = '/tinyrating';
306300
},
307-
disabled: offline,
301+
disabled: false,
308302
},
309303
{
310-
id: 'gutenberg-pr',
311-
title: 'Gutenberg PR',
312-
iconComponent: <PullRequestIcon />,
304+
id: 'tinyevent',
305+
title: 'tinyEvent',
306+
iconComponent: <WordPressIcon />,
313307
onClick: () => {
314-
modalDispatch(setActiveModal(modalSlugs.PREVIEW_PR_GUTENBERG));
308+
window.location.href = '/tinyevent';
315309
},
316-
disabled: offline,
310+
disabled: false,
317311
},
318312
...(!isInstallDisabledByQueryParam()
319313
? [

0 commit comments

Comments
 (0)