From 1b5a2ad11575d7cabb4ecc3683925fe794ab6bc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoannis=20S=C3=A1nchez=20Soto?= Date: Sat, 16 Nov 2024 08:24:57 -0500 Subject: [PATCH] feat: :sparkles: Add funcionality to editor bottom bar controls --- components/editor.tsx | 33 ++++++++++++++++++++------- components/settings/ImageSettings.tsx | 12 ++++------ 2 files changed, 30 insertions(+), 15 deletions(-) diff --git a/components/editor.tsx b/components/editor.tsx index b6df5a5..4f70732 100644 --- a/components/editor.tsx +++ b/components/editor.tsx @@ -1,7 +1,7 @@ /* eslint-disable @next/next/no-img-element */ "use client" -import { FormEvent, useEffect, useState } from "react" +import { FormEvent, useEffect, useRef, useState } from "react" import Image from "next/image" import { Config, removeBackground } from "@imgly/background-removal" import { sendGAEvent } from "@next/third-parties/google" @@ -42,6 +42,7 @@ import ImageSettings from "./settings/ImageSettings" import { ThemeToggle } from "./theme-toggle" export const Editor = () => { + const editor = useRef(null) const [show, setShow] = useState(false) const [files, setFiles] = useState([]) @@ -177,6 +178,7 @@ export const Editor = () => { return ( <> { - - - - - diff --git a/components/settings/ImageSettings.tsx b/components/settings/ImageSettings.tsx index dc1e740..4c98266 100644 --- a/components/settings/ImageSettings.tsx +++ b/components/settings/ImageSettings.tsx @@ -29,7 +29,7 @@ export default function ImageSettings({ return (
{/* Name */} -
+
{/* Remove */} -
+
{/* Model */} -
+
{/* Quality */} -
+
{/* Format */} -
+
- -
) }