From ed12ecdaa91744d5ad9e138aa485e689971727e8 Mon Sep 17 00:00:00 2001 From: Sofia Bilous Date: Wed, 22 Nov 2023 16:45:41 +0200 Subject: [PATCH 1/7] js->jsx --- FrontEnd/src/components/SearchPage/{Search.js => Search.jsx} | 0 .../search_field/{SearchResults.js => SearchResults.jsx} | 0 .../search_field/companies/{CompanyCard.js => CompanyCard.jsx} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename FrontEnd/src/components/SearchPage/{Search.js => Search.jsx} (100%) rename FrontEnd/src/components/SearchPage/search_field/{SearchResults.js => SearchResults.jsx} (100%) rename FrontEnd/src/components/SearchPage/search_field/companies/{CompanyCard.js => CompanyCard.jsx} (100%) diff --git a/FrontEnd/src/components/SearchPage/Search.js b/FrontEnd/src/components/SearchPage/Search.jsx similarity index 100% rename from FrontEnd/src/components/SearchPage/Search.js rename to FrontEnd/src/components/SearchPage/Search.jsx diff --git a/FrontEnd/src/components/SearchPage/search_field/SearchResults.js b/FrontEnd/src/components/SearchPage/search_field/SearchResults.jsx similarity index 100% rename from FrontEnd/src/components/SearchPage/search_field/SearchResults.js rename to FrontEnd/src/components/SearchPage/search_field/SearchResults.jsx diff --git a/FrontEnd/src/components/SearchPage/search_field/companies/CompanyCard.js b/FrontEnd/src/components/SearchPage/search_field/companies/CompanyCard.jsx similarity index 100% rename from FrontEnd/src/components/SearchPage/search_field/companies/CompanyCard.js rename to FrontEnd/src/components/SearchPage/search_field/companies/CompanyCard.jsx From 6b08dccbf909bcc4bfe7f1970f0a9e8120eed13a Mon Sep 17 00:00:00 2001 From: Sofia Bilous Date: Wed, 22 Nov 2023 18:54:48 +0200 Subject: [PATCH 2/7] delete location /admin from nginx.conf for normal work of custom administration --- configs/nginx/nginx.conf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/configs/nginx/nginx.conf b/configs/nginx/nginx.conf index 036c44ad0..f6c848aef 100644 --- a/configs/nginx/nginx.conf +++ b/configs/nginx/nginx.conf @@ -18,12 +18,12 @@ server { } # Django Admin - location /admin/ { - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $host; - proxy_pass http://api-dev:8000/admin/; - proxy_redirect off; - } + #location /admin/ { + #proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + #proxy_set_header Host $host; + #proxy_pass http://api-dev:8000/admin/; + #proxy_redirect off; + #} # PGAdmin location /pgadmin/ { From eff65e384417c1b66ded4869128597bd5addb335 Mon Sep 17 00:00:00 2001 From: Sofia Bilous Date: Wed, 22 Nov 2023 20:35:26 +0200 Subject: [PATCH 3/7] delete redundant route, return Django admin, change route for UI admin page --- FrontEnd/src/App.js | 6 +-- .../src/components/basicPage/BasicPage.jsx | 54 ++++++++++++++----- configs/nginx/nginx.conf | 12 ++--- 3 files changed, 51 insertions(+), 21 deletions(-) diff --git a/FrontEnd/src/App.js b/FrontEnd/src/App.js index 7b06606b4..0ce1e1d83 100644 --- a/FrontEnd/src/App.js +++ b/FrontEnd/src/App.js @@ -5,7 +5,7 @@ import AdminPage from './components/adminPage/AdminPage'; import BasicPage from './components/basicPage/BasicPage'; import { AuthContext } from './context'; import { useProvideAuth } from './hooks'; -import { Search } from './components/SearchPage/Search'; +// import { Search } from './components/SearchPage/Search'; function App() { const auth = useProvideAuth(); @@ -16,8 +16,8 @@ function App() {
} /> - } /> - } /> + } /> + {/* } /> */}
diff --git a/FrontEnd/src/components/basicPage/BasicPage.jsx b/FrontEnd/src/components/basicPage/BasicPage.jsx index 814e5abd9..7e9c83115 100644 --- a/FrontEnd/src/components/basicPage/BasicPage.jsx +++ b/FrontEnd/src/components/basicPage/BasicPage.jsx @@ -63,32 +63,62 @@ function BasicPage() { >
- } /> + } /> } /> - }/> - }/> + } + /> + } + /> {auth.isAuth ? ( } /> ) : ( } /> )} {auth.isAuth ? ( - } /> + } + /> ) : ( } /> )} } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> + } + /> + } + /> + } + /> + } + /> + } + /> + } + /> + } + /> } /> } /> } /> - } /> + } />