Skip to content

Commit 496d961

Browse files
committed
rfac: react-query in index.tsx (frontend)
1 parent 43e9f32 commit 496d961

File tree

10 files changed

+195
-184
lines changed

10 files changed

+195
-184
lines changed

Makefile

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
build: get
1+
build: buildFrontend buildProducerDevImage
2+
@docker run -it --rm -v $(shell pwd)/src/producer/:/app -v /var/autocd:/var/autocd -p 5001:5001 autocd-producer /bin/bash -c "mvn clean install -DskipTests -Dmaven.test.skip=true"
3+
4+
buildFrontend:
5+
@docker run -it --rm -v $(shell pwd)/:/app -p 3000:3000 autocd-client /bin/bash -c "npm --prefix ./src/client install && npm --prefix ./src/client run build"
6+
7+
build:
28
@npm --prefix ./src/client run build && mvn -f ./src/producer/pom.xml clean install -DskipTests -Dmaven.test.skip=true
39

410
run:
@@ -8,13 +14,13 @@ test:
814
@mvn -f ./src/producer/pom.xml test
915

1016
format: buildClientDevImage
11-
@docker run -it --rm -v $(shell pwd)/src/client/:/app -p 3000:3000 autocd-client /bin/bash -c "npm run format"
17+
@docker run -it --rm -v $(shell pwd)/src/client/:/app -p 3000:3000 autocd-client /bin/bash -c "npm install && npm run format"
1218

1319

1420
buildProducerDevImage:
1521
@docker build -t autocd-producer -f ./src/producer/Dockerfile.dev ./src/producer/
1622

17-
buildClientDevImage: get
23+
buildClientDevImage:
1824
@docker build -t autocd-client -f ./src/client/Dockerfile.dev ./src/client/
1925

2026
runProducerDevContainer: buildProducerDevImage
@@ -26,7 +32,8 @@ runClientDevImage: buildClientDevImage
2632

2733
help:
2834
@echo "Available commands:"
29-
@echo " make build - Build the application"
35+
@echo " make build - Build autoCD"
36+
@echo " make buildFrontend - Build the frontend"
3037
@echo " make buildProducerDevImage - Build java dev docker image"
3138
@echo " make runProducerDevContainer - Run java dev docker image"
3239
@echo " make buildClientDevImage - Build client dev image"

docs/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ This is a rough outline of what a contributor's workflow looks like:
5252
- Make sure the tests pass, and add any new tests as appropriate. ([Testing guidelines](TESTING.md))
5353
- Submit a pull request to the original repository.
5454

55-
Before submitting a pull request, make sure that you've executed `sudo make format`, `sudo make` and committed the format changes.
55+
Before submitting a pull request, make sure that you've executed `make format`, `maken buildFrontend` and committed the format changes.
5656

5757
Thanks for your contributions!
5858

src/client/src/index.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,19 @@ import App from './App';
44
import reportWebVitals from './reportWebVitals';
55
import { BrowserRouter } from 'react-router-dom';
66
import { Toaster } from 'react-hot-toast';
7+
import { QueryClient, QueryClientProvider } from 'react-query';
78

9+
const queryClient = new QueryClient();
810
const root = ReactDOM.createRoot(
911
document.getElementById('root') as HTMLElement
1012
);
1113
root.render(
1214
<React.StrictMode>
1315
<BrowserRouter>
1416
<Toaster />
15-
<App />
17+
<QueryClientProvider client={queryClient}>
18+
<App />
19+
</QueryClientProvider>
1620
</BrowserRouter>
1721
</React.StrictMode>
1822
);
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"files": {
33
"main.css": "/static/css/main.092e2e82.css",
4-
"main.js": "/static/js/main.fe467d57.js",
4+
"main.js": "/static/js/main.181c3982.js",
55
"static/js/453.419a5d54.chunk.js": "/static/js/453.419a5d54.chunk.js",
66
"static/media/autocd-logo.png": "/static/media/autocd-logo.a4cd8552835c4e76a8b9.png",
77
"index.html": "/index.html",
88
"main.092e2e82.css.map": "/static/css/main.092e2e82.css.map",
9-
"main.fe467d57.js.map": "/static/js/main.fe467d57.js.map",
9+
"main.181c3982.js.map": "/static/js/main.181c3982.js.map",
1010
"453.419a5d54.chunk.js.map": "/static/js/453.419a5d54.chunk.js.map"
1111
},
1212
"entrypoints": [
1313
"static/css/main.092e2e82.css",
14-
"static/js/main.fe467d57.js"
14+
"static/js/main.181c3982.js"
1515
]
1616
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="A tool to automate the process of Continuous Deployment in monolithic servers"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>autoCD</title><script defer="defer" src="/static/js/main.fe467d57.js"></script><link href="/static/css/main.092e2e82.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
1+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="A tool to automate the process of Continuous Deployment in monolithic servers"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>autoCD</title><script defer="defer" src="/static/js/main.181c3982.js"></script><link href="/static/css/main.092e2e82.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>

src/producer/src/main/resources/static/static/js/main.181c3982.js

Lines changed: 173 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/producer/src/main/resources/static/static/js/main.fe467d57.js.LICENSE.txt renamed to src/producer/src/main/resources/static/static/js/main.181c3982.js.LICENSE.txt

File renamed without changes.

src/producer/src/main/resources/static/static/js/main.181c3982.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/producer/src/main/resources/static/static/js/main.fe467d57.js

Lines changed: 0 additions & 173 deletions
This file was deleted.

src/producer/src/main/resources/static/static/js/main.fe467d57.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)