This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

core / web / src / routes / strings / new / +page.svelte
777 B 27 lines
1<script lang="ts"> 2 import { goto } from "$app/navigation"; 3 import { getAuth } from "$lib/auth.svelte"; 4 import StringForm from "$lib/components/strings/StringForm.svelte"; 5 6 const auth = getAuth(); 7 const user = $derived(auth.currentUser); 8 9 const handleSaved = async (rkey: string) => { 10 await goto(`/strings/${user?.handle}/${rkey}`); 11 }; 12</script> 13 14<svelte:head> 15 <title>New string &middot; Tangled</title> 16</svelte:head> 17 18<div class="mx-auto w-full max-w-screen-lg px-4 py-12"> 19 <div class="px-2 py-2"> 20 <h1 class="text-xl font-bold text-foreground-default">Create a new string</h1> 21 <p class="text-sm text-foreground-subtle">Store and share code snippets with ease.</p> 22 </div> 23 24 <div class="mt-4"> 25 <StringForm mode="create" onsaved={handleSaved} /> 26 </div> 27</div>