enter to submit, shift newline

This commit is contained in:
Dhravya 2024-07-04 13:34:10 -05:00
parent 7f76aa3135
commit e5ba0d8ca3

View file

@ -80,7 +80,7 @@ function QueryInput({
className="bg-transparent pt-2.5 text-base placeholder:text-[#9B9B9B] focus:text-gray-200 duration-200 tracking-[3%] outline-none resize-none w-full p-4"
placeholder="Ask your second brain..."
onKeyDown={(e) => {
if (e.key === "Enter") {
if (e.key === "Enter" && !e.shiftKey) {
e.preventDefault();
handleSubmit(q, preparedSpaces);
setQ("");