add auto select to the paste input and added a placeholder to the input
This commit is contained in:
parent
d50242b96e
commit
71e913092e
@ -1,6 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { ReactElement, useState } from "react";
|
||||
import { ReactElement, useEffect, useState } from "react";
|
||||
import { ActionMenu } from "@/app/components/action-menu";
|
||||
import { Button } from "@/app/components/ui/button";
|
||||
import { useToast } from "@/app/components/ui/use-toast";
|
||||
@ -52,6 +52,10 @@ export default function Home(): ReactElement {
|
||||
window.location.href = `/${data.id}`;
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
document.getElementById("paste-input")?.focus();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className="p-3 h-screen w-screen relative">
|
||||
<div className="flex gap-2 h-full w-full text-xs">
|
||||
@ -63,7 +67,9 @@ export default function Home(): ReactElement {
|
||||
onInput={(event) => {
|
||||
setValue((event.target as HTMLTextAreaElement).value);
|
||||
}}
|
||||
id="paste-input"
|
||||
className="w-full h-full bg-background outline-none resize-none"
|
||||
placeholder="Paste your code here..."
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
Reference in New Issue
Block a user