From c2cfcafc175aed6cdbb08c718e96506d1a5b6779 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Wed, 16 Aug 2023 19:20:24 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(Dockerfile):=20change=20orde?= =?UTF-8?q?r=20of=20COPY=20commands=20to=20improve=20build=20caching=20and?= =?UTF-8?q?=20efficiency=20=F0=9F=90=9B=20fix(exportModal/index.tsx):=20ad?= =?UTF-8?q?d=20state=20for=20invalidName=20to=20handle=20validation=20of?= =?UTF-8?q?=20name=20field?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/Dockerfile | 4 ++-- src/frontend/src/modals/exportModal/index.tsx | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/frontend/Dockerfile b/src/frontend/Dockerfile index 81abf18cd..024eab562 100644 --- a/src/frontend/Dockerfile +++ b/src/frontend/Dockerfile @@ -1,10 +1,10 @@ FROM node:20-alpine as frontend_build ARG BACKEND_URL WORKDIR /app -COPY ./src /app/src -COPY ./package.json ./package-lock.json ./tsconfig.json ./vite.config.ts ./index.html ./tailwind.config.js ./postcss.config.js ./prettier.config.js /app/ +COPY ./package.json ./package-lock.json ./tsconfig.json ./vite.config.ts ./index.html ./tailwind.config.js ./postcss.config.js ./prettier.config.js /app/ RUN npm install +COPY ./src /app/src RUN npm run build FROM nginx diff --git a/src/frontend/src/modals/exportModal/index.tsx b/src/frontend/src/modals/exportModal/index.tsx index 7514f955e..160ab599f 100644 --- a/src/frontend/src/modals/exportModal/index.tsx +++ b/src/frontend/src/modals/exportModal/index.tsx @@ -19,6 +19,7 @@ const ExportModal = forwardRef((props: { children: ReactNode }, ref) => { const [name, setName] = useState(flow.name); const [description, setDescription] = useState(flow.description); const [open, setOpen] = useState(false); + const [invalidName, setInvalidName] = useState(false); return (