PageSourceSearch

https://codir.pro/assets/BecomeAffiliate-Do-D4Au4.js

js codir.pro collected 2026-10-02 02:06:06 UTC 6,707 bytes, 1 lines download raw bytes

1import{u as b,r as x,j as e,m as n,v as f,L as w,t as m,b as h}from"./index-B0sM48fE.js";import{C as g}from"./circle-check-CxxoOG2b.js";import{A as j}from"./arrow-left-C0ILUW3s.js";import{S as v}from"./send-Cui5vdSF.js";const N=["Instagram","TikTok","YouTube","Twitter/X","Facebook","LinkedIn","Other"];function A(){const c=b(),[a,i]=x.useState({fullName:"",email:"",socialNetwork:"Instagram",socialHandle:"",followers:"",motivation:""}),[s,o]=x.useState(!1),[d,u]=x.useState(!1),p=async t=>{if(t.preventDefault(),!a.fullName||!a.email||!a.socialHandle||!a.followers||!a.motivation){m.error("Please fill in all fields");return}o(!0);try{const l=await h.entities.AffiliateApplication.create({...a,followers:parseInt(a.followers)||0,status:"pending"});await h.functions.invoke("sendAffiliateEmail",{type:"submitted",applicationId:l.id}),u(!0)}catch{m.error("Failed to submit")}finally{o(!1)}};return d?e.jsx("div",{className:"min-h-screen bg-black flex items-center justify-center px-4",children:e.jsxs(n.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"text-center max-w-md bg-[#0a0a0a] border border-white/10 rounded-2xl p-10",children:[e.jsx(g,{className:"h-14 w-14 text-green-400 mx-auto mb-5"}),e.jsx("h2",{className:"font-space font-bold text-2xl text-white mb-2",children:"Application sent!"}),e.jsx("p",{className:"text-white/80 text-sm",children:"We'll review your application and get back to you by email."}),e.jsx(f,{to:"/",className:"inline-block mt-6 text-sm text-white/80 hover:text-white transition-colors",children:"← Back to home"})]})}):e.jsxs("div",{className:"min-h-screen bg-black text-white",children:[e.jsx("div",{className:"fixed top-0 left-0 right-0 z-40 bg-black/70 backdrop-blur-md border-b border-white/5",children:e.jsxs("div",{className:"max-w-6xl mx-auto px-6 py-4 flex items-center justify-between",children:[e.jsxs("button",{onClick:()=>c("/"),className:"flex items-center gap-2 text-white/60 hover:text-white transition-colors text-sm font-medium",children:[e.jsx(j,{className:"h-4 w-4"})," Back"]}),e.jsx("span",{className:"font-space font-bold text-white tracking-tight",children:"CODIR"}),e.jsx("div",{className:"w-[80px]"})]})}),e.jsxs("div",{className:"pointer-events-none absolute inset-x-0 top-0 h-[700px] overflow-hidden",children:[e.jsx("div",{className:"absolute top-32 left-1/2 -translate-x-1/2 w-[600px] h-[600px] bg-primary/10 rounded-full blur-[140px]"}),e.jsx("div",{className:"absolute top-64 right-0 w-[400px] h-[400px] bg-accent/5 rounded-full blur-[120px]"})]}),e.jsx("div",{className:"relative pt-32 pb-20 px-6",children:e.jsxs("div",{className:"max-w-3xl mx-auto",children:[e.jsxs(n.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center mb-12",children:[e.jsx("div",{className:"text-xs font-bold text-white/80 uppercase tracking-[0.2em] mb-4",children:"Partner Program"}),e.jsxs("h1",{className:"font-space font-black text-3xl sm:text-6xl text-white tracking-tight mb-4 leading-tight",children:["Earn 30% recurring,",e.jsx("br",{}),e.jsx("span",{className:"text-white/80",children:"for life."})]}),e.jsx("p",{className:"text-white/80 text-base sm:text-lg max-w-xl mx-auto",children:"Refer creators to CODIR and earn a lifetime commission on every subscription."})]}),e.jsx(n.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.1},className:"grid grid-cols-3 gap-px bg-white/10 rounded-xl overflow-hidden mb-10",children:[{value:"30%",label:"Recurring"},{value:"∞",label:"Lifetime"},{value:"€70",label:"Min payout"}].map(t=>e.jsxs("div",{className:"flex flex-col items-center justify-center px-3 py-6 bg-[#0a0a0a]",children:[e.jsx("span",{className:"font-space font-bold text-2xl sm:text-3xl text-white tabular-nums mb-1",children:t.value}),e.jsx("span",{className:"text-xs text-white/80",children:t.label})]},t.label))}),e.jsxs(n.form,{onSubmit:p,initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.2},className:"bg-[#0a0a0a] border border-white/10 rounded-2xl p-8 sm:p-10 space-y-5",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsx(r,{label:"Full name",value:a.fullName,onChange:t=>i(l=>({...l,fullName:t})),placeholder:"Jean Dupont"}),e.jsx(r,{label:"Email",type:"email",value:a.email,onChange:t=>i(l=>({...l,email:t})),placeholder:"[email protected]"})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-[11px] font-semibold text-white/80 uppercase tracking-wider mb-2",children:"Main platform"}),e.jsx("select",{value:a.socialNetwork,onChange:t=>i(l=>({...l,socialNetwork:t.target.value})),className:"w-full bg-black/40 border border-white/10 rounded-xl px-4 py-3 text-white focus:outline-none focus:border-white/30 transition-colors",children:N.map(t=>e.jsx("option",{className:"bg-black",children:t},t))})]}),e.jsx(r,{label:"Handle / link",value:a.socialHandle,onChange:t=>i(l=>({...l,socialHandle:t})),placeholder:"@yourhandle"})]}),e.jsx(r,{label:"Followers",type:"number",value:a.followers,onChange:t=>i(l=>({...l,followers:t})),placeholder:"e.g. 10000"}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-[11px] font-semibold text-white/80 uppercase tracking-wider mb-2",children:"Why do you want to join?"}),e.jsx("textarea",{value:a.motivation,onChange:t=>i(l=>({...l,motivation:t.target.value})),rows:5,placeholder:"Tell us about your audience and motivation...",className:"w-full bg-black/40 border border-white/10 rounded-xl px-4 py-3 text-white placeholder:text-white/25 focus:outline-none focus:border-white/30 transition-colors resize-none"})]}),e.jsx("button",{type:"submit",disabled:s,className:"w-full flex items-center justify-center gap-2 bg-white text-black font-semibold py-3.5 rounded-full hover:bg-white/90 transition-colors disabled:opacity-50",children:s?e.jsxs(e.Fragment,{children:[e.jsx(w,{className:"h-4 w-4 animate-spin"}),"Sending…"]}):e.jsxs(e.Fragment,{children:["Submit application",e.jsx(v,{className:"h-4 w-4"})]})}),e.jsx("p",{className:"text-center text-xs text-white/80",children:"30% commission · Min payout €70 · Paid by IBAN transfer"})]})]})})]})}function r({label:c,type:a="text",value:i,onChange:s,placeholder:o}){return e.jsxs("div",{children:[e.jsx("label",{className:"block text-[11px] font-semibold text-white/80 uppercase tracking-wider mb-2",children:c}),e.jsx("input",{type:a,value:i,onChange:d=>s(d.target.value),placeholder:o,className:"w-full bg-black/40 border border-white/10 rounded-xl px-4 py-3 text-white placeholder:text-white/25 focus:outline-none focus:border-white/30 transition-colors"})]})}
1export{A as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.