Description
React generator has problem with paths for resources.
I generated a client using https://demo.api-platform.com/, while the generated routes have paths like /admin/books/create the Show components has paths like <Navigate to="/books/" replace />
How to reproduce
Generate a client with rm -rf ./tmp && yarn build && ENTRYPOINT=https://demo.api-platform.com/ ./testgen.sh react
Description
React generator has problem with paths for resources. I generated a client using https://demo.api-platform.com/, while the generated routes have paths like
/admin/books/create
the Show components has paths like<Navigate to="/books/" replace />
How to reproduce
rm -rf ./tmp && yarn build && ENTRYPOINT=https://demo.api-platform.com/ ./testgen.sh react
tmp/react/routes/book.tsx
you will seetmp/react/components/book/Show.tsx
and you can seePossible Solution
Use the same variable in all template when generating routes and links
Additional Context
PR here : https://github.com/api-platform/create-client/pull/377