This commit is contained in:
parent
e3ce3c90c7
commit
2a78d49bb0
1 changed files with 2 additions and 4 deletions
|
@ -3,12 +3,11 @@
|
|||
import { useRef, useEffect, useLayoutEffect } from 'react';
|
||||
import { useSearchParams } from 'next/navigation';
|
||||
|
||||
import comic_sans from '../../../../comic.ts';
|
||||
import { message_style } from '../components/Input.css';
|
||||
|
||||
export default function Input() {
|
||||
const search_params = useSearchParams();
|
||||
const input_ref = useRef<HTMLParagraphElement>(null);
|
||||
const input_ref = useRef<HTMLTextAreaElement | null>(null);
|
||||
|
||||
function set_message(message: string) {
|
||||
const encoded = btoa(message);
|
||||
|
@ -46,8 +45,7 @@ export default function Input() {
|
|||
<textarea
|
||||
ref={input_ref}
|
||||
className={message_style}
|
||||
type="text"
|
||||
rows="1"
|
||||
rows={1}
|
||||
onInput={() => set_message(input_ref.current!.textContent ?? '')}
|
||||
defaultValue={message}
|
||||
/>
|
||||
|
|
Loading…
Reference in a new issue