@@ -4,6 +4,7 @@ import { useAnimation } from '../context/AnimationContext';
44import { useToast } from './useToast' ;
55import { useVisualSettings } from '../context/VisualSettingsContext' ;
66import { useAchievements } from '../context/AchievementContext' ;
7+ import { useAboutData } from './useAboutData' ;
78import { version } from '../version' ;
89import { KEY_SIDEBAR_STATE , remove as removeLocalStorageItem } from '../utils/LocalStorageManager' ;
910import LiveClock from '../components/LiveClock' ;
@@ -39,6 +40,7 @@ export const useCommandRegistry = ({
3940 const { isAnimationEnabled, toggleAnimation } = useAnimation ( ) ;
4041 const { addToast } = useToast ( ) ;
4142 const { unlockAchievement } = useAchievements ( ) ;
43+ const aboutData = useAboutData ( ) ;
4244
4345 const {
4446 isInverted, toggleInvert,
@@ -82,7 +84,7 @@ export const useCommandRegistry = ({
8284 } ,
8385 viewSource : ( ) => {
8486 window . open (
85- 'https://github.com/fezcode/fezcode.github.io' ,
87+ aboutData . profile . links . find ( ( l ) => l . id === 'repo' ) ?. url || 'https://github.com/fezcode/fezcode.github.io' ,
8688 '_blank' ,
8789 'noopener,noreferrer' ,
8890 ) ;
@@ -96,28 +98,28 @@ export const useCommandRegistry = ({
9698 } ,
9799 sendEmailFezcode : ( ) => {
98100 window . open (
99- 'mailto:samil.bulbul@gmail.com' ,
101+ aboutData . profile . links . find ( ( l ) => l . id === 'email' ) ?. url || 'mailto:samil.bulbul@gmail.com' ,
100102 '_blank' ,
101103 'noopener,noreferrer' ,
102104 ) ;
103105 } ,
104106 openGitHub : ( ) => {
105107 window . open (
106- 'https://github.com/fezcode' ,
108+ aboutData . profile . links . find ( ( l ) => l . id === 'github' ) ?. url || 'https://github.com/fezcode' ,
107109 '_blank' ,
108110 'noopener,noreferrer' ,
109111 ) ;
110112 } ,
111113 openTwitter : ( ) => {
112114 window . open (
113- 'https://x.com/fezcoddy' ,
115+ aboutData . profile . links . find ( ( l ) => l . id === 'twitter' ) ?. url || 'https://x.com/fezcoddy' ,
114116 '_blank' ,
115117 'noopener,noreferrer' ,
116118 ) ;
117119 } ,
118120 openLinkedIn : ( ) => {
119121 window . open (
120- 'https://www.linkedin.com/in/ahmed-samil-bulbul/?locale=en_US' ,
122+ aboutData . profile . links . find ( ( l ) => l . id === 'linkedin' ) ?. url || 'https://www.linkedin.com/in/ahmed-samil-bulbul/?locale=en_US' ,
121123 '_blank' ,
122124 'noopener,noreferrer' ,
123125 ) ;
@@ -499,7 +501,8 @@ export const useCommandRegistry = ({
499501 const issueBody = encodeURIComponent (
500502 `Found an issue on:\n${ window . location . href } \n\n[Please describe the issue here]` ,
501503 ) ;
502- const githubIssueUrl = `https://github.com/fezcode/fezcode.github.io/issues/new?title=${ issueTitle } &body=${ issueBody } ` ;
504+ const repoUrl = aboutData . profile . links . find ( ( l ) => l . id === 'repo' ) ?. url || 'https://github.com/fezcode/fezcode.github.io' ;
505+ const githubIssueUrl = `${ repoUrl } /issues/new?title=${ issueTitle } &body=${ issueBody } ` ;
503506 window . open ( githubIssueUrl , '_blank' , 'noopener,noreferrer' ) ;
504507 addToast ( {
505508 title : 'GitHub Issue' ,
@@ -530,6 +533,7 @@ export const useCommandRegistry = ({
530533 toggleAnimation ,
531534 unlockAchievement ,
532535 toggleDigitalRain ,
536+ aboutData ,
533537
534538 // Visual Settings dependencies
535539 isInverted , toggleInvert ,
0 commit comments