Skip to content

Commit

Permalink
[Image Converter] Broken after upgrade to remix + vite (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
inssein authored Mar 29, 2024
1 parent e5aff13 commit 137526d
Show file tree
Hide file tree
Showing 6 changed files with 589 additions and 417 deletions.
1 change: 1 addition & 0 deletions .idea/prettier.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import dark from "../node_modules/highlight.js/styles/stackoverflow-dark.css?url
import { ArrowLeftIcon } from "@heroicons/react/20/solid";

// @ts-expect-error hack to get around react-dnd + vite issue
globalThis.global = {};
globalThis.global = typeof window !== "undefined" ? window : {};

export const meta: MetaFunction = () => {
const title = "Utiliti";
Expand Down
3 changes: 3 additions & 0 deletions app/routes/image-converter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import {
XCircleIcon,
} from "@heroicons/react/24/outline";
import { classNames } from "~/common";
import { DropTargetMonitor, useDrop } from "react-dnd";
import { NativeTypes } from "react-dnd-html5-backend";

export const meta = metaHelper(
utilities.imageConverter.name,
Expand All @@ -36,6 +38,7 @@ function renameFile(file: File, format: string) {

return `${filenameWithoutExtension}.${format}`;
}

export default function ImageConverter() {
const [files, setFiles] = useState<File[]>([]);
const [dataUrls, setDataUrls] = useState<string[]>([]);
Expand Down
Loading

0 comments on commit 137526d

Please sign in to comment.