Skip to content

Commit

Permalink
Update README and re-add db global css class
Browse files Browse the repository at this point in the history
  • Loading branch information
pomm0 committed Jun 16, 2020
1 parent 9094473 commit b26084d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Mgruber sample project (React)

A react showcase app.
The visual part was not the main focus.
It uses [miragejs](https://miragejs.com/) to mock api-server.

Deployed on https://cv.mgruber.dev

---

## How to start
Expand All @@ -13,6 +19,7 @@
Even this app only uses one service I use `docker-compose`. I like the simplesness of just calling `docker-compose up -d`.

- Start docker-compose with `docker-compose up` or `docker-compose up -d` (deamon mode)
- Wait for server ready (it will install dependencies which may take a bit)
- Go to `http://localhost:3000`

## Run tests
Expand All @@ -24,3 +31,10 @@ Even this app only uses one service I use `docker-compose`. I like the simplesne

- Install npm dependencies: `npm install`
- Start build: `npm run build`

### TODOS:

- Add E2E testing
- Add translations (https://react.i18next.com/)
- Remove `data-testid` from production build (https://github.com/oliviertassinari/babel-plugin-react-remove-properties)
- Allow `today` as valid date for new bank transfer
1 change: 1 addition & 0 deletions src/components/DynamicCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const DynamicCard = (props) => {
useEffect(() => {
setState({ isError: false, isLoading: true });

// TODO: Fix potential component state update while component is unmounted
promiseWithMinRuntime(backendFetch({ urlPath }))
.then((response) => {
if (!response.ok) {
Expand Down
1 change: 1 addition & 0 deletions src/components/StatefulFetchHoc.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export const StatefulFetchHoc = (props) => {
const fetch = () => {
setState({ isError: false, isLoading: true, isResolved: false });

// TODO: Fix potential component state update while component is unmounted
backendFetch({ urlPath, method, headers, body })
.then((fetchResponse) => {
if (!fetchResponse.ok) {
Expand Down
6 changes: 6 additions & 0 deletions src/styles/layout/display.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
.dn {
display: none;
}

.db {
display: block;
}

.df {
display: flex;
}
Expand All @@ -9,6 +14,7 @@
.dn-md {
display: none;
}

.df-md {
display: flex;
}
Expand Down

0 comments on commit b26084d

Please sign in to comment.