fix: unify entry animations and eliminate layout flicker on overview, syllabus tracker, and doubt forum

This commit is contained in:
2026-10-23 17:42:34 +05:30
parent 5c9126ed7a
commit f9e0fb752b
7 changed files with 401 additions and 199 deletions

View File

@@ -13,14 +13,10 @@ interface PremiumGateProps {
export function PremiumGate({ featureKey, children }: PremiumGateProps) {
const { hasAccessTo, loading, user } = useActiveUser();
// Allow children to render immediately without a blocking center spinner
// so that page entry animations (animate-section) execute smoothly on route transition.
if (loading || !user) {
return (
<div className="flex-1 min-h-[400px] flex items-center justify-center">
<div className="flex flex-col items-center gap-4">
<div className="w-10 h-10 border-4 border-[var(--cyan-ai-20)] border-t-[var(--cyan-ai)] rounded-full animate-spin"></div>
</div>
</div>
);
return <>{children}</>;
}
if (!hasAccessTo(featureKey)) {