"use client" import Image from "next/image" import { useEffect, useRef } from "react" export default function New({ type, stopEditing, }: { type: "file" | "folder" stopEditing: () => void }) { const inputRef = useRef(null) const createFile = () => { console.log("Create File") stopEditing() } useEffect(() => { inputRef.current?.focus() }, []) return (
File Icon
{ e.preventDefault() createFile() }} > createFile()} />
) }