🐛 fix(Dockerfile): change order of COPY commands to improve build caching and efficiency

🐛 fix(exportModal/index.tsx): add state for invalidName to handle validation of name field
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-08-16 19:20:24 -03:00
commit c2cfcafc17
2 changed files with 3 additions and 2 deletions

View file

@ -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

View file

@ -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 (
<BaseModal size="smaller" open={open} setOpen={setOpen}>