👀 Auto-adder WIP
This commit is contained in:
@@ -50,7 +50,6 @@ $size-8: 0.9rem;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.volumes-container {
|
.volumes-container {
|
||||||
margin-top: 3rem;
|
|
||||||
|
|
||||||
.stack {
|
.stack {
|
||||||
max-width: 200px;
|
max-width: 200px;
|
||||||
|
|||||||
@@ -21,7 +21,9 @@ export const VolumeGroups = (): ReactElement => {
|
|||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
<section className="volumes-container">
|
<section className="volumes-container">
|
||||||
<h2 className="subtitle">Volumes</h2>
|
<div className="content">
|
||||||
|
<div className="subtitle">Volumes</div>
|
||||||
|
</div>
|
||||||
<Masonry
|
<Masonry
|
||||||
breakpointCols={breakpointColumnsObj}
|
breakpointCols={breakpointColumnsObj}
|
||||||
className="volumes-grid"
|
className="volumes-grid"
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import io, { Socket } from "socket.io-client";
|
|||||||
import { SOCKET_BASE_URI } from "../../constants/endpoints";
|
import { SOCKET_BASE_URI } from "../../constants/endpoints";
|
||||||
import { useDispatch } from "react-redux";
|
import { useDispatch } from "react-redux";
|
||||||
import { RMQ_SOCKET_CONNECTED } from "../../constants/action-types";
|
import { RMQ_SOCKET_CONNECTED } from "../../constants/action-types";
|
||||||
|
import { success } from "react-notification-system-redux";
|
||||||
|
|
||||||
const WebSocketContext = createContext(null);
|
const WebSocketContext = createContext(null);
|
||||||
export const WebSocketProvider = ({ children }): ReactElement => {
|
export const WebSocketProvider = ({ children }): ReactElement => {
|
||||||
@@ -16,6 +17,20 @@ export const WebSocketProvider = ({ children }): ReactElement => {
|
|||||||
socketId: socket.id,
|
socketId: socket.id,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
// on cover extraction
|
||||||
|
socket.on("coverExtracted", (data) => {
|
||||||
|
console.log("shaket", data);
|
||||||
|
dispatch(
|
||||||
|
success({
|
||||||
|
// uid: 'once-please', // you can specify your own uid if required
|
||||||
|
title: "Cover Extracted",
|
||||||
|
message: `<span class="icon-text has-text-success"><i class="fas fa-plug"></i></span> Socket <span class="has-text-info">${socket.id}</span> connected. <strong>${data}</strong>`,
|
||||||
|
dismissible: "click",
|
||||||
|
position: "tr",
|
||||||
|
autoDismiss: 0,
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
})
|
||||||
socket.on("disconnect", () => {
|
socket.on("disconnect", () => {
|
||||||
console.log(`disconnect`);
|
console.log(`disconnect`);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -163,9 +163,7 @@ export const extractNumerals = (inputString: string): MatchArray[string] => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const refineQuery = (inputString: string) => {
|
export const refineQuery = (inputString: string) => {
|
||||||
|
|
||||||
const queryObj = tokenize(inputString);
|
const queryObj = tokenize(inputString);
|
||||||
console.log(queryObj)
|
|
||||||
const removedYears = xor(
|
const removedYears = xor(
|
||||||
queryObj.sentence_tokens.normalized,
|
queryObj.sentence_tokens.normalized,
|
||||||
queryObj.years.yearMatches,
|
queryObj.years.yearMatches,
|
||||||
|
|||||||
@@ -56,8 +56,8 @@ amqp.connect("amqp://localhost", (error0, connection) => {
|
|||||||
durable: false,
|
durable: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(`Connected to ${queue} queue.`);
|
console.log(`RabbitMQ: Connected to ${queue} queue.`);
|
||||||
console.log(`Waiting for comic book cover data in ${queue}`);
|
console.log(`RabbitMQ: Waiting for comic book cover data in ${queue}`);
|
||||||
|
|
||||||
channel.consume(
|
channel.consume(
|
||||||
queue,
|
queue,
|
||||||
|
|||||||
Reference in New Issue
Block a user