chore: no more processing image stuff

This commit is contained in:
2025-05-10 17:40:16 +01:00
parent a4b94fc6c2
commit b4a0383be7
2 changed files with 3 additions and 16 deletions

View File

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

View File

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