File tree Expand file tree Collapse file tree
src/routes/(console)/project-[region]-[project]/auth Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 import { Icon , Tag } from ' @appwrite.io/pink-svelte' ;
1111 import { createEventDispatcher } from ' svelte' ;
1212
13- export let showCreate = false ;
13+ let { showCreate = $bindable ( false ) } : { showCreate : boolean } = $props () ;
1414
1515 const dispatch = createEventDispatcher ();
1616
17- let name: string , id: string , error: string ;
18- let showCustomId = false ;
17+ let name = $state (' ' );
18+ let id = $state <string | null >(null );
19+ let error = $state <string | null >(null );
20+ let showCustomId = $state (false );
1921
2022 const create = async () => {
2123 try {
4244 }
4345 };
4446
45- $ : if (! showCreate ) {
46- showCustomId = false ;
47- error = null ;
48- }
47+ $effect (() => {
48+ if (! showCreate ) {
49+ showCustomId = false ;
50+ id = null ;
51+ error = null ;
52+ }
53+ });
4954 </script >
5055
5156<Modal title ="Create team" {error } size ="m" bind:show ={showCreate } onSubmit ={create }>
You can’t perform that action at this time.
0 commit comments