Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat CTRL + Y to submit the solution #1419

Merged
merged 5 commits into from May 25, 2024
Merged

Conversation

sital002
Copy link
Contributor

@sital002 sital002 commented Feb 9, 2024

Description

I have added a shortcut (CTRL + Y )to submit the solution.

Related Issue

Closes #1408

Motivation and Context

How Has This Been Tested?

Screenshots/Video (if applicable):

Copy link

vercel bot commented Feb 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
typehero-og-image ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 25, 2024 11:18pm
typehero-web-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 25, 2024 11:18pm

Copy link

vercel bot commented Feb 9, 2024

@sital002 is attempting to deploy a commit to the trash company Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

github-actions bot commented Feb 9, 2024

E2E report: https://256e75c8.typehero-70p.pages.dev

const onSubmit = (e: KeyboardEvent) => {
if ((e.ctrlKey || e.metaKey) && e.code === 'KeyY') {
e.preventDefault();
if (submitButtonRef.current) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don’t need to simulate clicking the button. just call the same function

Copy link
Contributor Author

@sital002 sital002 Feb 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried calling the handleSubmit function but when directly calling the handleSubmit the tsErros will be undefined so every submit passed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm i’ll take a look

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quick update it's now working the linter didn't give me any warning regarding missing dependency.

@sital002
Copy link
Contributor Author

@bautistaaa can you review this PR.

@sital002 sital002 requested a review from bautistaaa May 25, 2024 12:22
@bautistaaa bautistaaa enabled auto-merge (squash) May 25, 2024 23:11
@bautistaaa bautistaaa merged commit 7dca499 into typehero:main May 25, 2024
9 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: keyboard shortcut to submit a solution
2 participants