Fixed loading icon loading at mount

This commit is contained in:
martin 2023-07-24 20:55:49 +02:00
parent 7656d35227
commit 449673800d
2 changed files with 10 additions and 11 deletions

View File

@ -1,4 +1,4 @@
ErrorDocument 404 /404.html
ErrorDocument 404 /index.html
<IfModule mod_headers.c>
Header add Access-Control-Allow-Origin 'https://api.martials.no/'

View File

@ -245,19 +245,18 @@ hideIntermediate=${ hideIntermediates() }`)
</Show>
</Row>
<Show when={ error() } keyed>
<ErrorBox title={ error()?.title ?? "Error" }
error={ error()?.message ?? "Something went wrong" } />
</Show>
<Show when={ isLoaded() } fallback={
<Show when={ isLoaded() === false } keyed>
<Icon path={ arrowPath } aria-label={ "Loading indicator" } class={ "animate-spin mx-auto" } />
} keyed>
</Show>
<Show when={ error() } keyed>
<ErrorBox title={ error()?.title ?? "Error" }
error={ error()?.message ?? "Something went wrong" } />
</Show>
<Show when={ simplifyEnabled() && (fetchResult()?.orderOperations?.length ?? 0) > 0 } keyed>
<ShowMeHow fetchResult={ fetchResult } />
</Show>
<Show when={ simplifyEnabled() && (fetchResult()?.orderOperations?.length ?? 0) > 0 } keyed>
<ShowMeHow fetchResult={ fetchResult } />
</Show>
</div>