Browse Source

feat(issue-compose): goto issue page on creation

so the user gets a better sense that the issue has been created
master
DanConwayDev 2 years ago
parent
commit
81c5146aa4
No known key found for this signature in database
GPG Key ID: 68E15486D73F75E1
  1. 7
      src/lib/wrappers/ComposeIssue.svelte

7
src/lib/wrappers/ComposeIssue.svelte

@ -5,6 +5,7 @@
import { getUserRelays, logged_in_user } from '$lib/stores/users' import { getUserRelays, logged_in_user } from '$lib/stores/users'
import Compose from '$lib/components/events/Compose.svelte' import Compose from '$lib/components/events/Compose.svelte'
import type { RepoEvent } from '$lib/components/repo/type' import type { RepoEvent } from '$lib/components/repo/type'
import { goto } from '$app/navigation'
export let repo_event: RepoEvent export let repo_event: RepoEvent
@ -59,8 +60,8 @@
submitting = false submitting = false
submitted = true submitted = true
setTimeout(() => { setTimeout(() => {
submitted = false goto(`/repo/${repo_event.identifier}/issues/${event.id}`)
}, 5000) }, 2000)
} catch {} } catch {}
} }
</script> </script>
@ -74,5 +75,5 @@
/> />
{/if} {/if}
{#if submitted} {#if submitted}
<div>sent!</div> <div>sent going to issue!</div>
{/if} {/if}

Loading…
Cancel
Save