Skip to content

Commit

Permalink
feat: support path based routing (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
sayan-truefoundry authored May 23, 2024
1 parent c709fb6 commit 82ebcaf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 3 additions & 0 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ WORKDIR /build
COPY . .
RUN yarn install
RUN test -e .env || cp .env.example .env
ARG VITE_USE_RELATIVE_BASE_URL VITE_DOCS_QA_STANDALONE_PATH
ENV VITE_USE_RELATIVE_BASE_URL=${VITE_USE_RELATIVE_BASE_URL} \
VITE_DOCS_QA_STANDALONE_PATH=${VITE_DOCS_QA_STANDALONE_PATH}
RUN yarn build

FROM node:18.2.0 AS production-stage
Expand Down
4 changes: 1 addition & 3 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ import history from './router/history'
import { DOCS_QA_STANDALONE_PATH } from './stores/constants'

const getBaseName = () => {
return DOCS_QA_STANDALONE_PATH
? '/' + DOCS_QA_STANDALONE_PATH
: undefined
return DOCS_QA_STANDALONE_PATH ? '/' + DOCS_QA_STANDALONE_PATH : undefined
}

function App() {
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/stores/constants.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// docs qa
export const IS_DOCS_QA_REDIRECT_ENABLED =
import.meta.env.VITE_DOCS_QA_ENABLE_REDIRECT === 'true'
export const DOCS_QA_STANDALONE_PATH =
import.meta.env.VITE_DOCS_QA_STANDALONE_PATH || 'docs-qa'
import.meta.env.VITE_DOCS_QA_STANDALONE_PATH
export const DOCS_QA_MAX_UPLOAD_SIZE_MB = parseInt(
import.meta.env.VITE_DOCS_QA_MAX_UPLOAD_SIZE_MB || '2'
)

0 comments on commit 82ebcaf

Please sign in to comment.