Skip to content

Commit 665b0fa

Browse files
authored
Merge pull request #954 from AvdLee/docs/claim-offer-route
Add /claim-offer redirect page
2 parents 9c61854 + a0a4934 commit 665b0fa

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

docs/astro.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export default defineConfig({
6060
page !== "https://www.rocketsim.app/terms" &&
6161
page !== "https://www.rocketsim.app/privacy" &&
6262
page !== "https://www.rocketsim.app/thank-you" &&
63+
page !== "https://www.rocketsim.app/claim-offer" &&
6364
page !== "https://www.rocketsim.app/signup/trial/thank-you" &&
6465
page !== "https://www.rocketsim.app/404" &&
6566
page !== "https://www.rocketsim.app/docs/404",

docs/src/pages/claim-offer.astro

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
import config from "@/config/config.json";
3+
import Base from "@/layouts/Base.astro";
4+
5+
const {
6+
site: { base_url },
7+
} = config;
8+
9+
const seo = {
10+
title: "Opening RocketSim | RocketSim",
11+
description: "Opening RocketSim and forwarding your offer details.",
12+
canonical: `${base_url}/claim-offer`,
13+
robots: {
14+
index: false,
15+
follow: false,
16+
},
17+
};
18+
---
19+
20+
<Base seo={seo}>
21+
<section class="py-48 text-center">
22+
<div class="container mx-auto px-4">
23+
<h1 class="text-4xl font-bold mb-4">Opening RocketSim...</h1>
24+
<p class="text-xl text-gray-400 mb-8">
25+
If RocketSim does not open automatically, you'll be redirected to the
26+
homepage shortly.
27+
</p>
28+
<a href="/" class="btn btn-primary"
29+
>If nothing happened, click here to visit RocketSim</a
30+
>
31+
</div>
32+
</section>
33+
</Base>
34+
35+
<script is:inline>
36+
const deepLink = `rocketsim://open-offer${window.location.search}`;
37+
const fallbackUrl = "https://www.rocketsim.app";
38+
39+
window.location.href = deepLink;
40+
41+
window.setTimeout(() => {
42+
window.location.replace(fallbackUrl);
43+
}, 2000);
44+
</script>

0 commit comments

Comments
 (0)