chore: no more processing image stuff
This commit is contained in:
@ -7,7 +7,6 @@ import {
|
||||
type Component,
|
||||
type ParentProps,
|
||||
createEffect,
|
||||
createSignal,
|
||||
onCleanup,
|
||||
} from "solid-js";
|
||||
import {
|
||||
@ -20,7 +19,7 @@ import { Search } from "./Search";
|
||||
import { Settings } from "./Settings";
|
||||
import { ImageViewer } from "./components/ImageViewer";
|
||||
import { SearchImageContextProvider } from "./contexts/SearchImageContext";
|
||||
import { type sendImage, sendImageFile } from "./network";
|
||||
import { sendImageFile } from "./network";
|
||||
import { Image } from "./Image";
|
||||
import { WithEntityDialog } from "./WithEntityDialog";
|
||||
|
||||
@ -78,13 +77,9 @@ export const App = () => {
|
||||
};
|
||||
});
|
||||
|
||||
const [processingImage, setProcessingImage] = createSignal<
|
||||
Awaited<ReturnType<typeof sendImage>> | undefined
|
||||
>();
|
||||
|
||||
return (
|
||||
<SearchImageContextProvider>
|
||||
<ImageViewer onSendImage={setProcessingImage} />
|
||||
<ImageViewer />
|
||||
<Router>
|
||||
<Route path="/" component={AppWrapper}>
|
||||
<Route path="/login" component={Login} />
|
||||
|
@ -3,17 +3,11 @@ import { getCurrentWindow } from "@tauri-apps/api/window";
|
||||
import { type Component, createEffect } from "solid-js";
|
||||
import { sendImage } from "../network";
|
||||
|
||||
type ImageViewerProps = {
|
||||
onSendImage: (
|
||||
processingImage: Awaited<ReturnType<typeof sendImage>>,
|
||||
) => void;
|
||||
};
|
||||
|
||||
// This probably shouldn't live here.
|
||||
// The request should be made from rust but hey.
|
||||
// We'll do that later
|
||||
|
||||
export const ImageViewer: Component<ImageViewerProps> = (props) => {
|
||||
export const ImageViewer: Component = () => {
|
||||
// const [latestImage, setLatestImage] = createSignal<string | null>(null);
|
||||
|
||||
let sentImage = "";
|
||||
@ -38,8 +32,6 @@ export const ImageViewer: Component<ImageViewerProps> = (props) => {
|
||||
|
||||
const result = await sendImage("test-image.png", base64Data);
|
||||
|
||||
props.onSendImage(result);
|
||||
|
||||
console.log("DBG: ", result);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user