feat: add hazards
This commit is contained in:
@ -25,6 +25,8 @@
|
||||
import { Tween } from "svelte/motion";
|
||||
import { quintOut } from "svelte/easing";
|
||||
import Progressbar from "../Progressbar.svelte";
|
||||
import { postHazard } from "$lib/services/lnv";
|
||||
import { fetchHazards } from "./hazards.svelte";
|
||||
|
||||
const views: Record<string, string> = {
|
||||
main: "MainSidebar",
|
||||
@ -282,6 +284,16 @@
|
||||
>
|
||||
{m["location.join"]()}
|
||||
</Button>
|
||||
<Button
|
||||
variant="outline"
|
||||
onclick={async () => {
|
||||
await postHazard({ lat: location.lat, lon: location.lng }, "bumpy-road");
|
||||
alert("Thanks for your report!");
|
||||
await fetchHazards();
|
||||
}}
|
||||
>
|
||||
Report Bumpy Road
|
||||
</Button>
|
||||
</div>
|
||||
</Popover.Content>
|
||||
</Popover.Root>
|
||||
|
||||
Reference in New Issue
Block a user