A Prediction Market on the AT Protocol

feat(web): fix toast and loading spinner

Ciaran 347c8bc6 fc073ac7

+2 -6
+2 -6
src/web/app.tsx
··· 38 38 39 39 const [loading, setLoading] = useState<string | boolean>(false); 40 40 41 - if (markets.isLoading) return <Spinner className='m-auto' /> 41 + if (markets.isLoading) return <div className="p-4"><Spinner className='m-auto' /></div> 42 42 43 43 return <div className="grid md:grid-cols-2 gap-2"> 44 44 {markets.data?.map(market => { ··· 53 53 cid: market.cid, 54 54 }, position, profile.did, client) 55 55 if (res.uri) { 56 - toast(`Placed "${position.toUpperCase()}" bet (${res.uri}) at market ${market.uri}`); 57 - toast(<div> 58 - <p>Placed bet: <a href={`https://pdsls.dev/${res.uri}`}>{position.toUpperCase()}</a></p> 59 - <p>At market: <a href={`https://pdsls.dev/${market.uri}`}>{market.rkey}</a></p> 60 - </div>) 56 + toast(<>Placed {position.toUpperCase()} Bet <a target="_blank" href={`https://pdsls.dev/${res.uri}`}>{res.uri.split("/")[res.uri.split("/").length-1]}</a> at market: <a target="_blank" href={`https://pdsls.dev/${market.uri}`}>{market.rkey}</a></>) 61 57 } 62 58 } catch (e) { 63 59 toast(e as any)