This commit is contained in:
2023-03-01 17:00:06 -05:00
parent 020e5e9528
commit 084ef3c07a
12 changed files with 30 additions and 35 deletions

View File

@@ -10,7 +10,7 @@
<body>
<div id="root"></div>
<script type="module" src="./src/client/index.tsx"></script>
<script type="module" src="/src/client/index.tsx"></script>
</body>
</html>

View File

@@ -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",

View File

@@ -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;

View File

@@ -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;

View File

@@ -83,14 +83,14 @@ export const RecentlyImported = ({
{/* Raw file presence */}
{isNil(rawFileDetails) && (
<span className="icon custom-icon is-small has-text-danger mr-2">
<img src="/img/missing-file.svg" />
<img src="/src/client/img/missing-file.svg" />
</span>
)}
{/* ComicInfo.xml presence */}
{!isNil(comicInfo) && !isEmpty(comicInfo) && (
<span className="icon custom-icon is-small has-text-danger">
<img
src="/img/comicinfoxml.svg"
src="/src/client/img/comicinfoxml.svg"
alt={"ComicInfo.xml file detected."}
/>
</span>
@@ -99,8 +99,8 @@ export const RecentlyImported = ({
{isComicBookMetadataAvailable && (
<span className="icon custom-icon">
<img
src="/img/cvlogo.svg"
alt={"ComicInfo.xml file detected."}
src="/src/client/assets/img/cvlogo.svg"
alt={"ComicVine metadata detected."}
/>
</span>
)}

View File

@@ -82,12 +82,12 @@ export const WantedComicsList = ({
{/* comicVine metadata presence */}
{isComicBookMetadataAvailable && (
<span className="icon custom-icon">
<img src="/img/cvlogo.svg" />
<img src="/src/client/assets/img/cvlogo.svg" />
</span>
)}
{!isEmpty(locg) && (
<span className="icon custom-icon">
<img src="/img/locglogo.svg" />
<img src="/src/client/img/locglogo.svg" />
</span>
)}
{/* Issue type */}

View File

@@ -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 => {
<i className="fa-solid fa-magnifying-glass"></i>
</span>
</div>
{!isEmpty(searchResults) ? (
<div
className="columns box is-multiline"

View File

@@ -25,7 +25,7 @@ const Navbar: React.FunctionComponent = (props) => {
<div className="navbar-brand">
<Link to="/" className="navbar-item">
<img
src="/img/threetwo.svg"
src="/src/client/assets/img/threetwo.svg"
alt="ThreeTwo! A comic book curator"
width="112"
height="28"

View File

@@ -233,7 +233,7 @@ function fileOpsReducer(state = initialState, action) {
case SS_SEARCH_RESULTS_FETCHED_SPECIAL: {
const foo = [];
if (!isUndefined(action.data.hits)) {
map(action.data.hits.hits, ({ _source }) => {
map(action.data.hits, ({ _source }) => {
foo.push(_source);
});
}

View File

@@ -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}`);

View File

@@ -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

View File

@@ -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"