sync title to query

This commit is contained in:
Daniel Bulant 2021-05-20 17:07:54 +02:00
parent 8ea35930ab
commit a9a5779e92

View file

@ -1,6 +1,12 @@
<script>
import request from "../util/request";
var name = "";
import { params } from '@roxi/routify'
var name = $params.search;
$: {
const url = new URL(window.location.toString());
url.searchParams.set("search", name);
history.replaceState(history.state, "", url.toString());
}
var result = request("manga", "title=" + name + "&contentRating[]=safe&contentRating[]=suggestive");
$: result = request("manga", "title=" + name + "&contentRating[]=safe&contentRating[]=suggestive");
result.then(console.log);