Fix market form flash

This commit is contained in:
ekzyis 2024-09-11 12:42:01 +02:00
parent ab4238f2a4
commit c2e3ce783b
2 changed files with 8 additions and 2 deletions

View File

@ -194,4 +194,10 @@
#modal { #modal {
backdrop-filter: blur(10px); backdrop-filter: blur(10px);
} }
/* fix content flash that will be hidden when AlpineJS runs
* see https://alpinejs.dev/directives/cloak */
[x-cloak] {
display: none !important;
}
} }

View File

@ -53,10 +53,10 @@ templ Market(m types.Market, p0 []types.Point, p1 []types.Point, quoteNo types.M
BET NO BET NO
</button> </button>
</div> </div>
<div class="mx-auto my-5" x-show="outcome === 1"> <div class="mx-auto my-5" x-cloak x-show="outcome === 1">
@components.MarketForm(m, 1, quoteYes, uQuantityYes) @components.MarketForm(m, 1, quoteYes, uQuantityYes)
</div> </div>
<div class="mx-auto my-5" x-show="outcome === 0"> <div class="mx-auto my-5" x-cloak x-show="outcome === 0">
@components.MarketForm(m, 0, quoteNo, uQuantityNo) @components.MarketForm(m, 0, quoteNo, uQuantityNo)
</div> </div>
</div> </div>