All files / src/ui AuthHandler.svelte

100% Statements 27/27
0% Branches 0/1
100% Functions 0/0
100% Lines 27/27

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 281x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x  
<script>
	import { authStatus } from '../kavach'
 
	import AuthProvider from './AuthProvider.svelte'
	import AuthResponse from './AuthResponse.svelte'
	import AuthError from './AuthError.svelte'
 
	export let providers
</script>
 
<auth class="flex flex-col gap-2">
	<auth-header class="flex flex-col">
		{#if $authStatus}
			{#if $authStatus.error}
				<AuthError {...$authStatus.error} />
			{:else if $authStatus.message}
				<AuthResponse {...$authStatus} />
			{/if}
		{/if}
	</auth-header>
 
	<auth-body class="flex flex-col gap-2">
		{#each providers as data}
			<AuthProvider {...data} on:submit />
		{/each}
	</auth-body>
</auth>