diff --git a/public/diagonal-stripes.svg b/public/diagonal-stripes.svg new file mode 100644 index 0000000..1237279 --- /dev/null +++ b/public/diagonal-stripes.svg @@ -0,0 +1,5 @@ + + + + diff --git a/src/App.tsx b/src/App.tsx index a4a4d9f..ced7b8f 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,6 +1,7 @@ import { createEffect, createSignal, For } from "solid-js"; import UrlForm from "./components/UrlForm"; import UrlItem from "./components/UrlItem"; +import transition from "./transition"; const URI_LIST = "text/uri-list"; @@ -53,13 +54,15 @@ export default function App() { function handleUrlSubmit(url: URL) { console.debug("Submitted url", url); //TODO use map to deduplicate and reduce garbage - setUrls((urls) => { - const index = urls.findIndex((otherUrl) => otherUrl.href === url.href); + transition(() => { + setUrls((urls) => { + const index = urls.findIndex((otherUrl) => otherUrl.href === url.href); - console.debug("Found url", index); - if (index !== -1) return urls; + console.debug("Found url", index); + if (index !== -1) return urls; - return [...urls, url]; + return [...urls, url]; + }); }); } @@ -73,7 +76,7 @@ export default function App() {

Add Destination

Destinations

-