fix(admin): use correct admin token and fix react dom crash
Build and Deploy (Gitea) / build-and-deploy (push) Failing after 1m28s
Details
Build and Deploy (Gitea) / build-and-deploy (push) Failing after 1m28s
Details
This commit is contained in:
parent
6a16d97161
commit
df1d63019e
File diff suppressed because it is too large
Load Diff
1727
server-prisma.ts
1727
server-prisma.ts
File diff suppressed because it is too large
Load Diff
|
|
@ -32,7 +32,7 @@ function CoursePricingCard({ course, saveLoading, onSave }: { course: Course, sa
|
||||||
localLocked ? 'bg-amber-500/20 text-amber-400 border border-amber-500/30' : 'bg-emerald-500/20 text-emerald-400 border border-emerald-500/30'
|
localLocked ? 'bg-amber-500/20 text-amber-400 border border-amber-500/30' : 'bg-emerald-500/20 text-emerald-400 border border-emerald-500/30'
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
{localLocked ? '💰 Pago (Bloqueado)' : '🔓 Gratuito (Livre)'}
|
{localLocked ? <span>💰 Pago (Bloqueado)</span> : <span>🔓 Gratuito (Livre)</span>}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -67,7 +67,7 @@ function CoursePricingCard({ course, saveLoading, onSave }: { course: Course, sa
|
||||||
) : (
|
) : (
|
||||||
<Save className="w-4 h-4" />
|
<Save className="w-4 h-4" />
|
||||||
)}
|
)}
|
||||||
Salvar Alteração
|
<span>Salvar Alteração</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
@ -82,7 +82,7 @@ export const AdminPricingManager: React.FC<AdminPricingManagerProps> = ({ course
|
||||||
const [showPlanModal, setShowPlanModal] = useState(false);
|
const [showPlanModal, setShowPlanModal] = useState(false);
|
||||||
const [planForm, setPlanForm] = useState<Partial<Plan>>({ cycle: 'LIFETIME', active: true, includedCourses: [] });
|
const [planForm, setPlanForm] = useState<Partial<Plan>>({ cycle: 'LIFETIME', active: true, includedCourses: [] });
|
||||||
|
|
||||||
const token = localStorage.getItem('devflix_token');
|
const token = localStorage.getItem('devflix_admin_token');
|
||||||
|
|
||||||
const fetchPlans = async () => {
|
const fetchPlans = async () => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue