Rishabh-malhotraa / caucus

Realtime Collaborate Editor with Embedded Compiler
https://caucus.rishabhmalhotra.in/
MIT License
297 stars 70 forks source link

solved issue: "Keybinds to run Code" #41

Closed MarufSharifi closed 3 years ago

MarufSharifi commented 3 years ago

I have done these tasks

  1. Created a new context to store the execution information by the name of CodeExecutionInfoContext
  2. Defined a type for CodeExecutionInfoContext in types file
  3. Wrapped InputOutputFile.tsx and CodeMirrorEditor.tsx. in Room.tsx with CodeExecutionInfoProvider.
  4. Move the local state of InputOutputFile.tsx to context, so that can be used inside CodeMirrorEditor.tsx.
  5. bind the key Ctrl+' in CodeMirror to execute the codes.
  6. Created a function by name of submitProblem to execute the cods. in CodeMirrorEditor.tsx..

closes #23

Rishabh-malhotraa commented 3 years ago

Thanks for the PR @MarufSharifi

The code looks great ✨!

I did a code review and proposed some changes to the PR(look at the code review)

Rishabh-malhotraa commented 3 years ago

LGTM thank you ✨