From 13e407dcc2a31b1ca0b24f0235cbb8b5edbf8ced Mon Sep 17 00:00:00 2001 From: Konstantinos Paparas Date: Fri, 3 Jul 2026 17:58:56 +0200 Subject: [PATCH] docs: add dynamic referral rewards table Fetch tier prices and reward rates live from the referral program endpoint and render them in a table on the referral guide. Falls back to a styled empty state that points to the subscription page when the request fails or returns no tiers. --- .vitepress/theme/index.ts | 2 + components/ReferralRewardsTable.vue | 159 ++++++++++++++++++++++++++++ premium/referrals.md | 2 + 3 files changed, 163 insertions(+) create mode 100644 components/ReferralRewardsTable.vue diff --git a/.vitepress/theme/index.ts b/.vitepress/theme/index.ts index 842d399..a228f1e 100644 --- a/.vitepress/theme/index.ts +++ b/.vitepress/theme/index.ts @@ -5,6 +5,7 @@ import DefaultTheme from 'vitepress/theme'; import { h } from 'vue'; import CsvTable from '@/components/CsvTable.vue'; import NavCards from '@/components/NavCards.vue'; +import ReferralRewardsTable from '@/components/ReferralRewardsTable.vue'; import './style.css'; export default { @@ -16,6 +17,7 @@ export default { enhanceAppWithTabs(app); app.component('CsvTable', CsvTable); app.component('NavCards', NavCards); + app.component('ReferralRewardsTable', ReferralRewardsTable); app.component('CopyOrDownloadAsMarkdownButtons', CopyOrDownloadAsMarkdownButtons); }, } satisfies Theme; diff --git a/components/ReferralRewardsTable.vue b/components/ReferralRewardsTable.vue new file mode 100644 index 0000000..8516da5 --- /dev/null +++ b/components/ReferralRewardsTable.vue @@ -0,0 +1,159 @@ + + + + + diff --git a/premium/referrals.md b/premium/referrals.md index 363f9a0..c7871b8 100644 --- a/premium/referrals.md +++ b/premium/referrals.md @@ -69,6 +69,8 @@ A referral discount applies only to the first payment of a new subscription. Ren When someone you referred makes their first qualifying purchase, you receive account credit based on what they paid. + + - Your balance and a full history of credit earned and used appear in the Account Credit section of your [subscription page](https://rotki.com/home/subscription). - Credit is applied automatically to your subscription purchases, renewals, and upgrades. You do not need to enter anything. - Credit is granted once per referred user, on their first non-upgrade purchase.