Skip to content

Commit

Permalink
feat: add Redirection component to the playground
Browse files Browse the repository at this point in the history
  • Loading branch information
lauramargar committed Jun 20, 2024
1 parent f090bdb commit bf928c9
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
<template>
<SearchInput />
<Redirection
#default="{ redirection, redirect, abortRedirect, isRedirecting, delayInSeconds }"
#default="{ redirection, redirect, abortRedirect }"
class="redirection-container"
:delayInSeconds="5"
>
<p>Your search matches a special place in our website. You are being redirected to:</p>
<a @click="redirect" :href="redirection.url" data-test="redirection-link">
{{ redirection.url }}
</a>
<div class="x-flex x-gap-32">
<button @click="abortRedirect" class="">No, I'll stay here</button>
<button @click="redirect" class="">Yes, redirect me</button>
<div>
<button @click="abortRedirect">No, I'll stay here</button>
<button @click="redirect">Yes, redirect me</button>
</div>
<AutoProgressBar :isLoading="isRedirecting" :durationInSeconds="delayInSeconds" />
</Redirection>
</template>

<script setup>
import Redirection from '../../../../../x-components/src/x-modules/search/components/redirection.vue';
import AutoProgressBar from '../../../../../x-components/src/components/auto-progress-bar.vue';
import SearchInput from '../../../../../x-components/src/x-modules/search-box/components/search-input.vue';
</script>

Expand Down

0 comments on commit bf928c9

Please sign in to comment.