Skip to content

Commit

Permalink
Add support and community page links
Browse files Browse the repository at this point in the history
  • Loading branch information
atulbhatt-system32 committed Dec 21, 2023
1 parent f46b3db commit 34fbf7d
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/pages/main/hooks/useCmdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,16 @@ export const useCmdk = ({ cmdkReferenceData, importProject }: IUseCmdk) => {
const onOpenGuidePage = useCallback(() => {
window.open("https://guide.rnbw.dev", "_blank", "noreferrer");
}, []);
const onOpenSupportPage = useCallback(() => {
window.open(
"https://github.com/orgs/rnbwdev/discussions",
"_blank",
"noreferrer",
);
}, []);
const onOpenCommunityPage = useCallback(() => {
window.open("https://discord.gg/HycXz8TJkd", "_blank", "noreferrer");
}, []);
const onToggleTheme = useCallback(() => {
switch (theme) {
case "System":
Expand Down Expand Up @@ -297,7 +307,6 @@ export const useCmdk = ({ cmdkReferenceData, importProject }: IUseCmdk) => {
}, [KeyDownEventListener]);
useEffect(() => {
if (!currentCommand) return;

switch (currentCommand.action) {
case "Jumpstart":
onJumpstart();
Expand Down Expand Up @@ -337,6 +346,12 @@ export const useCmdk = ({ cmdkReferenceData, importProject }: IUseCmdk) => {
case "Guide":
onOpenGuidePage();
break;
case "Support":
onOpenSupportPage();
break;
case "Community":
onOpenCommunityPage();
break;
case "Download":
onDownload();
break;
Expand Down

0 comments on commit 34fbf7d

Please sign in to comment.