Skip to content

Commit cf889a9

Browse files
committed
feat: create issue
1 parent 4f5e657 commit cf889a9

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/components/CommandPalette.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,14 @@ const CommandPalette = ({ isOpen, setIsOpen, openGenericModal, toggleDigitalRain
190190
addToast({ title: 'Full Screen', message: 'Exited full screen mode.', duration: 2000 });
191191
}
192192
break;
193+
case 'openGitHubIssue': {
194+
const issueTitle = encodeURIComponent(`Issue on page: ${window.location.pathname}`);
195+
const issueBody = encodeURIComponent(`Found an issue on:\n${window.location.href}\n\n[Please describe the issue here]`);
196+
const githubIssueUrl = `https://github.com/fezcode/fezcode.github.io/issues/new?title=${issueTitle}&body=${issueBody}`;
197+
window.open(githubIssueUrl, '_blank', 'noopener,noreferrer');
198+
addToast({ title: 'GitHub Issue', message: 'Opening new GitHub issue tab!', duration: 3000 });
199+
break;
200+
}
193201
default:
194202
break;
195203
}

src/hooks/useSearchableData.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ const useSearchableData = () => {
8686
{ title: 'Reload Page', type: 'command', commandId: 'reloadPage' },
8787
{ title: 'Go to Random App', type: 'command', commandId: 'randomApp' },
8888
{ title: 'Toggle Full Screen', type: 'command', commandId: 'toggleFullScreen' },
89+
{ title: 'Create Issue for This Page', type: 'command', commandId: 'openGitHubIssue' },
8990
{ title: 'Her Daim', type: 'command', commandId: 'herDaim' },
9091
];
9192

0 commit comments

Comments
 (0)