fix: unify entry animations and eliminate layout flicker on overview, syllabus tracker, and doubt forum
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user