nuxt-x-affiliate
Dashboard
Full affiliate dashboard composing all sub-components into a single authenticated view.
Dashboard
The XAFDashboard component is the all-in-one authenticated affiliate dashboard. It reads all state from useAffiliate() internally — the consuming app only needs to populate state via setters before rendering.
Components
<XAFDashboard />
No props required. Populate useAffiliate() state from your API before mounting.
<script setup>
const { setAffiliate, setStats, setReferrals, setPayouts, setTiers } = useAffiliate()
onMounted(async () => {
const data = await $fetch('/api/affiliate/me')
setAffiliate(data.affiliate)
setStats(data.stats)
setReferrals(data.referrals)
setPayouts(data.payouts)
setTiers(data.tiers)
})
</script>
<template>
<XAFDashboard />
</template>
Props
| Prop | Type | Default | Description |
|---|---|---|---|
currency | string | 'USD' | Currency code passed down to monetary sub-components |
AI Context
component: XAFDashboard
package: "@xenterprises/nuxt-x-affiliate"
use-when: Full authenticated affiliate dashboard page — renders all sub-components from a single tag
