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