mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-05 22:03:50 +03:00
parent
4fd0188d2c
commit
331622383a
@ -34,6 +34,12 @@ export function PostInput(props) {
|
|||||||
|
|
||||||
}, [promptUpload]);
|
}, [promptUpload]);
|
||||||
|
|
||||||
|
const handleKeyDown = (e) => {
|
||||||
|
if((e.getModifierState('Control') || e.metaKey) && e.key === 'Enter') {
|
||||||
|
sendPost();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const sendPost = async () => {
|
const sendPost = async () => {
|
||||||
if (!graphResource) {
|
if (!graphResource) {
|
||||||
console.error("graphResource is undefined, cannot post");
|
console.error("graphResource is undefined, cannot post");
|
||||||
@ -90,6 +96,7 @@ export function PostInput(props) {
|
|||||||
spellCheck="false"
|
spellCheck="false"
|
||||||
value={postContent}
|
value={postContent}
|
||||||
onChange={e => setPostContent(e.target.value)}
|
onChange={e => setPostContent(e.target.value)}
|
||||||
|
onKeyDown={handleKeyDown}
|
||||||
/>
|
/>
|
||||||
<Row
|
<Row
|
||||||
borderTop={1}
|
borderTop={1}
|
||||||
|
Loading…
Reference in New Issue
Block a user