Skip to content

Commit

Permalink
Review comments: #57
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Niehoff <[email protected]>
  • Loading branch information
ChristophNiehoff committed Aug 14, 2023
1 parent fc174f1 commit a4a1557
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ npm run build

#### Imprint and privacy notices

Links to imprint and privacy notices can be included into the client, if the environment variable
Links to imprint and privacy notices can be included into the client, if the environment variables

```bash
export REACT_APP_EOP_IMPRINT="https://example.tld/imprint/"
Expand All @@ -157,7 +157,7 @@ are set when building the app.
When building the client via docker these env vars can be set by defining `build-args`

```bash
docker build --build-arg "EOP_IMPRINT=https://example.tld/imprint/" --build-arg "EOP_PRIVACY=https://example.tld/privacy/" -f docker/client.dockerfile . -t "some-tag"
docker build --build-arg "REACT_APP_EOP_IMPRINT=https://example.tld/imprint/" --build-arg "REACT_APP_EOP_PRIVACY=https://example.tld/privacy/" -f docker/client.dockerfile . -t "some-tag"
```

### Using MongoDB
Expand Down
8 changes: 4 additions & 4 deletions docker/client.dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM node:16.13.1-alpine3.14 AS builder
ARG EOP_IMPRINT
ARG EOP_PRIVACY
ARG REACT_APP_EOP_IMPRINT
ARG REACT_APP_EOP_PRIVACY
WORKDIR /usr/src/app
COPY package.json ./
COPY package-lock.json ./
Expand All @@ -13,8 +13,8 @@ COPY ./.eslintrc.cjs ./.eslintrc.cjs
COPY ./.prettierignore ./.prettierignore
COPY ./.prettierrc.cjs ./.prettierc.cjs
COPY ./src ./src
ENV REACT_APP_EOP_IMPRINT=$EOP_IMPRINT
ENV REACT_APP_EOP_PRIVACY=$EOP_PRIVACY
ENV REACT_APP_EOP_IMPRINT=$REACT_APP_EOP_IMPRINT
ENV REACT_APP_EOP_PRIVACY=$REACT_APP_EOP_PRIVACY
RUN npm run build:client

FROM nginxinc/nginx-unprivileged:1.20.1-alpine
Expand Down
2 changes: 0 additions & 2 deletions src/client/components/board/board.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ const G = {
const ctx = {
actionPlayers: [0, 1, 2],
};
Board.prototype.componentDidMount = jest.fn();


describe('Board', () => {
it('renders without crashing', async () => {
Expand Down
2 changes: 1 addition & 1 deletion src/client/components/footer/imprint.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Imprint: FC = () => {
<a href={process.env.REACT_APP_EOP_IMPRINT}>Imprint</a>
);
}
return (<></>);
return null;

}

Expand Down
2 changes: 1 addition & 1 deletion src/client/components/footer/privacy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Privacy: FC = () => {
<a href={process.env.REACT_APP_EOP_PRIVACY}>Privacy</a>
);
}
return (<></>);
return null;
}

export default Privacy;
2 changes: 1 addition & 1 deletion src/client/pages/__tests__/create.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { render, screen } from '@testing-library/react';
import Create from '../create';
import { BrowserRouter as Router } from 'react-router-dom';

describe('<Create />', () => {
describe('Create', () => {
it('renders without crashing', async () => {
render(<Router><Create /></Router>);

Expand Down

0 comments on commit a4a1557

Please sign in to comment.