aboutsummaryrefslogtreecommitdiff
path: root/src/lib/Error/AnimeRateLimited.svelte
blob: 5813ce5101d9f0b96021d9fde2d22607dd954d57 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<script>
  import Spacer from '$lib/Layout/Spacer.svelte';
  import Popup from '$lib/Layout/Popup.svelte';
</script>

<Popup locked fullscreen>
  <p><slot /></p>

  <span>It is likely that you have been rate-limited by AniList. Please try again later.</span>

  {#await fetch('https://api.waifu.pics/sfw/cry') then response}
    {#await response.json() then json}
      <Spacer />

      <a href={`https://trace.moe/?url=${encodeURIComponent(json.url)}`} target="_blank">
        <img src={json.url} alt="" style="width: 30vw;" />
      </a>
    {/await}
  {/await}
</Popup>