File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
src/routes/(console)/project-[region]-[project]/auth Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change 10
10
import { Icon , Tag } from ' @appwrite.io/pink-svelte' ;
11
11
import { createEventDispatcher } from ' svelte' ;
12
12
13
- export let showCreate = false ;
13
+ let { showCreate = $bindable ( false ) } : { showCreate : boolean } = $props () ;
14
14
15
15
const dispatch = createEventDispatcher ();
16
16
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 );
19
21
20
22
const create = async () => {
21
23
try {
42
44
}
43
45
};
44
46
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
+ });
49
54
</script >
50
55
51
56
<Modal title ="Create team" {error } size ="m" bind:show ={showCreate } onSubmit ={create }>
You can’t perform that action at this time.
0 commit comments