diff --git a/index.html b/index.html index 43c6261..21d1f3a 100644 --- a/index.html +++ b/index.html @@ -10,7 +10,7 @@
- + \ No newline at end of file diff --git a/package.json b/package.json index dcb37f3..dccc0b1 100644 --- a/package.json +++ b/package.json @@ -6,11 +6,7 @@ "typings": "server/index.js", "scripts": { "build": "vite build", - "start": "npm run build && npm run server", - "client": "vite", - "server": "tsc -p tsconfig.server.json && node server/", - "dev": "concurrently \"nodemon\" \"npm run client\"", - "server-dev": "nodemon", + "dev": "rimraf dist && vite", "docs": "jsdoc -c jsdoc.json" }, "author": "Rishi Ghan", @@ -127,7 +123,7 @@ "npm": "^8.11.0", "prettier": "^2.2.1", "react-refresh": "^0.14.0", - "rimraf": "^3.0.2", + "rimraf": "^4.1.3", "sass": "^1.58.1", "tslint": "^6.1.3", "typescript": "^4.2.3", diff --git a/src/client/actions/fileops.actions.tsx b/src/client/actions/fileops.actions.tsx index fb2098a..bb54b2b 100644 --- a/src/client/actions/fileops.actions.tsx +++ b/src/client/actions/fileops.actions.tsx @@ -307,7 +307,7 @@ export const searchIssue = (query, options) => async (dispatch) => { case "globalSearchBar": dispatch({ type: SS_SEARCH_RESULTS_FETCHED_SPECIAL, - data: response.data.body, + data: response.data.hits, }); break; diff --git a/src/client/assets/scss/App.scss b/src/client/assets/scss/App.scss index efb9b6b..97e0634 100644 --- a/src/client/assets/scss/App.scss +++ b/src/client/assets/scss/App.scss @@ -1,8 +1,8 @@ -@import "../../../../node_modules/bulma/bulma.sass"; -$fa-font-path: "~@fortawesome/fontawesome-free/webfonts"; -@import "../../../../node_modules/@fortawesome/fontawesome-free/scss/fontawesome.scss"; -@import "../../../../node_modules/@fortawesome/fontawesome-free/scss/regular.scss"; -@import "../../../../node_modules/@fortawesome/fontawesome-free/scss/solid.scss"; +@import "/node_modules/bulma/bulma.sass"; +$fa-font-path: "/node_modules/@fortawesome/fontawesome-free/webfonts"; +@import "/node_modules/@fortawesome/fontawesome-free/scss/fontawesome.scss"; +@import "/node_modules/@fortawesome/fontawesome-free/scss/regular.scss"; +@import "/node_modules/@fortawesome/fontawesome-free/scss/solid.scss"; $bg-color: yellow; $border-color: red; diff --git a/src/client/components/Dashboard/RecentlyImported.tsx b/src/client/components/Dashboard/RecentlyImported.tsx index 8516b14..eb9b2df 100644 --- a/src/client/components/Dashboard/RecentlyImported.tsx +++ b/src/client/components/Dashboard/RecentlyImported.tsx @@ -83,14 +83,14 @@ export const RecentlyImported = ({ {/* Raw file presence */} {isNil(rawFileDetails) && ( - + )} {/* ComicInfo.xml presence */} {!isNil(comicInfo) && !isEmpty(comicInfo) && ( {"ComicInfo.xml @@ -99,8 +99,8 @@ export const RecentlyImported = ({ {isComicBookMetadataAvailable && ( {"ComicInfo.xml )} diff --git a/src/client/components/Dashboard/WantedComicsList.tsx b/src/client/components/Dashboard/WantedComicsList.tsx index e0f1c9d..02dcf49 100644 --- a/src/client/components/Dashboard/WantedComicsList.tsx +++ b/src/client/components/Dashboard/WantedComicsList.tsx @@ -82,12 +82,12 @@ export const WantedComicsList = ({ {/* comicVine metadata presence */} {isComicBookMetadataAvailable && ( - + )} {!isEmpty(locg) && ( - + )} {/* Issue type */} diff --git a/src/client/components/GlobalSearchBar/SearchBar.tsx b/src/client/components/GlobalSearchBar/SearchBar.tsx index 958b091..3563359 100644 --- a/src/client/components/GlobalSearchBar/SearchBar.tsx +++ b/src/client/components/GlobalSearchBar/SearchBar.tsx @@ -31,7 +31,7 @@ export const SearchBar = (data: ISearchBarProps): ReactElement => { from: 0, }, type: "volumeName", - trigger: "globalSearchBar" + trigger: "globalSearchBar", }, ), ); @@ -51,7 +51,6 @@ export const SearchBar = (data: ISearchBarProps): ReactElement => { - {!isEmpty(searchResults) ? (
{
ThreeTwo! A comic book curator { + map(action.data.hits, ({ _source }) => { foo.push(_source); }); } diff --git a/src/server/index.ts b/src/server/index.ts index 85abd08..674ba29 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -30,12 +30,12 @@ app.use(bodyParser.urlencoded({ extended: true })); // REGISTER ROUTES // all of the routes will be prefixed with /api const routes: Router[] = Object.values(router); -app.use("/api", routes); +// app.use("/api", routes); // Send index.html on root request -app.use(express.static("dist")); -app.use(express.static("public")); +// app.use(express.static("dist")); +// app.use(express.static("public")); -app.listen(port); +// app.listen(port); -console.log(`Server is listening on ${port}`); +// console.log(`Server is listening on ${port}`); diff --git a/vite.config.js b/vite.config.js index dca656d..b0b81ec 100644 --- a/vite.config.js +++ b/vite.config.js @@ -3,9 +3,9 @@ import { nodeResolve } from "@rollup/plugin-node-resolve"; import { defineConfig } from "vite"; export default defineConfig({ - // publicDir: "./public", + publicDir: "public", + base: "", build: "esnext", - base: "/", plugins: [ nodeResolve({ // browser: true diff --git a/yarn.lock b/yarn.lock index 68c355a..800045a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2233,11 +2233,6 @@ resolved "https://registry.yarnpkg.com/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz#96116f2a912e0c02817345b3c10751069920d553" integrity sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg== -"@storybook/preset-scss@^1.0.3": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@storybook/preset-scss/-/preset-scss-1.0.3.tgz#8ac834545c642dada0f64f510ef08dfb882e9737" - integrity sha512-o9Iz6wxPeNENrQa2mKlsDKynBfqU2uWaRP80HeWp4TkGgf7/x3DVF2O7yi9N0x/PI1qzzTTpxlQ90D62XmpiTw== - "@tanstack/react-table@^8.5.11": version "8.5.11" resolved "https://registry.yarnpkg.com/@tanstack/react-table/-/react-table-8.5.11.tgz#544f551f15412087edfc2df01bed9697aab4651f" @@ -9713,6 +9708,11 @@ rimraf@^3.0.0, rimraf@^3.0.2: dependencies: glob "^7.1.3" +rimraf@^4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-4.1.3.tgz#e8ace19d5f009b4fa6108deeaffe39ef68bba194" + integrity sha512-iyzalDLo3l5FZxxaIGUY7xI4Bf90Xt7pCipc1Mr7RsdU7H3538z+M0tlsUDrz0aHeGS9uNqiKHUJyTewwRP91Q== + rollup@^3.10.0: version "3.15.0" resolved "https://registry.yarnpkg.com/rollup/-/rollup-3.15.0.tgz#6f4105e8c4b8145229657b74ad660b02fbfacc05"