summaryrefslogtreecommitdiff
path: root/ui/lib/components/CreateChannelForm.svelte
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2024-11-03 21:47:30 -0500
committerOwen Jacobson <owen@grimoire.ca>2024-11-03 21:47:30 -0500
commit65381f49cc9abce98c1c63c399fdcfc8ce76c3f5 (patch)
treee0b1eea57aa8b431aa83e2efc4577c12d3cc2b29 /ui/lib/components/CreateChannelForm.svelte
parent30fa0c4c1faece6b054105fe3cce5107f24a2fa2 (diff)
parentf38881f3253b3a128154ffd95655859e3dc629dc (diff)
Merge remote-tracking branch 'origin/wip/actually-configure-prettier'
Diffstat (limited to 'ui/lib/components/CreateChannelForm.svelte')
-rw-r--r--ui/lib/components/CreateChannelForm.svelte42
1 files changed, 21 insertions, 21 deletions
diff --git a/ui/lib/components/CreateChannelForm.svelte b/ui/lib/components/CreateChannelForm.svelte
index ac43925..afa3f78 100644
--- a/ui/lib/components/CreateChannelForm.svelte
+++ b/ui/lib/components/CreateChannelForm.svelte
@@ -1,30 +1,30 @@
<script>
- import { createChannel } from '$lib/apiServer';
+ import { createChannel } from '$lib/apiServer';
- let name = $state('');
- let pending = false;
- let disabled = $derived(pending);
+ let name = $state('');
+ let pending = false;
+ let disabled = $derived(pending);
- async function handleSubmit(event) {
- event.preventDefault();
- pending = true;
- const response = await createChannel(name);
- if (200 <= response.status && response.status < 300) {
- name = '';
- }
- pending = false;
- }
+ async function handleSubmit(event) {
+ event.preventDefault();
+ pending = true;
+ const response = await createChannel(name);
+ if (200 <= response.status && response.status < 300) {
+ name = '';
+ }
+ pending = false;
+ }
</script>
<form onsubmit={handleSubmit} class="form form-row flex-nowrap">
- <input
- type="text"
- placeholder="create channel"
- bind:value={name}
- {disabled}
- class="input flex-auto h-6 w-9/12"
- />
- <button type="submit" class="flex-none w-6 h-6">&#x2795;</button>
+ <input
+ type="text"
+ placeholder="create channel"
+ bind:value={name}
+ {disabled}
+ class="input flex-auto h-6 w-9/12"
+ />
+ <button type="submit" class="flex-none w-6 h-6">&#x2795;</button>
</form>
<style>