File size: 632 Bytes
32c5da4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App";
import "./styles.css";

if (!window.imageForge) {
  window.imageForge = {
    openFolder: async () => {},
    saveImage: async () => {
      window.alert("Save is only available in the desktop app.");
      return false;
    },
    showError: async (title: string, message: string) => {
      window.alert(`${title}: ${message}`);
    },
    pickImage: async () => null,
    readImageDataUrl: async () => null,
  };
}

ReactDOM.createRoot(document.getElementById("root")!).render(
  <React.StrictMode>
    <App />
  </React.StrictMode>
);