Skip to content

Commit

Permalink
fix(key-shortcuts): update key shortcut (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
dorian-grst authored Oct 13, 2024
1 parent 68c2c7d commit 810a426
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/app/login/login-feature.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default function LoginFeature() {
setOtpValue('')
}, [])

const handleDelKeyPress = useCallback(
const handleEscapeKeyPress = useCallback(
(e: KeyboardEvent) => {
console.log('Delete key pressed')
e.preventDefault()
Expand All @@ -104,7 +104,7 @@ export default function LoginFeature() {
[router]
)

useKeyPress('Backspace', handleDelKeyPress)
useKeyPress('Escape', handleEscapeKeyPress);

useEffect(() => {
if (verified) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/gist-details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export default function GistDetails({ gist, folder, redirect, onDownloadClick, o
<span>Share your gist</span>
<Shortcut letter="Ctrl" />
<span>+</span>
<Shortcut letter="Maj" />
<Shortcut letter="Shft" />
<span>+</span>
<Shortcut letter="S" />
</TooltipContent>
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/gist-landing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export default function GistLanding({ gist, onDownload, onLogin, onShare, onShar
<span>Share your gist</span>
<Shortcut letter="Ctrl" />
<span>+</span>
<Shortcut letter="Maj" />
<Shortcut letter="Shft" />
<span>+</span>
<Shortcut letter="S" />
</TooltipContent>
Expand Down

0 comments on commit 810a426

Please sign in to comment.