diff --git a/app/components/Footer.tsx b/app/components/Footer.tsx
index 0c79a4e..04964a4 100644
--- a/app/components/Footer.tsx
+++ b/app/components/Footer.tsx
@@ -49,10 +49,10 @@ export const Footer = () => {
- {link.label}
+ {link.label}
))}
diff --git a/app/routes/_index.tsx b/app/routes/_index.tsx
index 237b9e4..a40b46b 100644
--- a/app/routes/_index.tsx
+++ b/app/routes/_index.tsx
@@ -15,6 +15,7 @@ import { FullPage } from "~/components/FullPage";
import { t } from "~/utils/i18n";
import { LinksFunction } from "@remix-run/node";
+import React from "react";
export const meta: MetaFunction = () => {
return [
@@ -31,6 +32,19 @@ export const links: LinksFunction = () => {
export default function HomePage() {
const bg = useColorModeValue("white", "gray.700");
+ const fileInput = React.useRef(null);
+
+ const onFileChange = (e: React.ChangeEvent) => {
+ const file = e.target.files?.item(0);
+ if (file) {
+ const reader = new FileReader();
+ reader.onload = () => {
+ const url = reader.result as string;
+ window.location.href = `/view.html?url=${encodeURIComponent(url)}`;
+ };
+ reader.readAsDataURL(file);
+ }
+ }
return (
@@ -43,10 +57,17 @@ export default function HomePage() {
{t("view an SVG image from another website")}
+
+
+
+ {t("view an SVG image from your computer")}
+