@@ -13,10 +13,7 @@ import { cn } from '@/lib/utils'
1313import { useAuth } from '@/lib/auth'
1414import {
1515 getUserPreferences ,
16- updateUserPreferences ,
17- UserPreferences
18- } from '@/lib/user-settings'
19- import { themeCustomization , subscriptionTier } from '@/flags'
16+ updateUserPreferences } from '@/lib/user-settings'
2017import { useFeatureFlag , useFeatureValue } from '@/hooks/use-edge-flags'
2118
2219const themes = [
@@ -66,7 +63,6 @@ export default function AppearanceSettings() {
6663 const { session } = useAuth ( ( ) => { } , ( ) => { } )
6764 const { toast } = useToast ( )
6865
69- // Feature flags
7066 const { enabled : hasThemeCustomization } = useFeatureFlag ( 'theme-customization' , false )
7167 const { value : userSubscriptionTier } = useFeatureValue < 'free' | 'pro' | 'enterprise' > ( 'subscription-tier' , 'free' )
7268
@@ -75,7 +71,6 @@ export default function AppearanceSettings() {
7571 const [ isLoading , setIsLoading ] = useState ( true )
7672 const [ isUpdating , setIsUpdating ] = useState ( false )
7773
78- // Advanced customization options
7974 const [ accentColor , setAccentColor ] = useState ( '#3B82F6' )
8075 const [ borderRadius , setBorderRadius ] = useState ( [ 8 ] )
8176 const [ animationsEnabled , setAnimationsEnabled ] = useState ( true )
@@ -119,11 +114,9 @@ export default function AppearanceSettings() {
119114
120115 setIsUpdating ( true )
121116 try {
122-
123117 setSelectedTheme ( newTheme )
124118 setTheme ( newTheme )
125119
126-
127120 const success = await updateUserPreferences ( session . user . id , {
128121 theme : newTheme
129122 } )
@@ -134,7 +127,6 @@ export default function AppearanceSettings() {
134127 description : "Theme updated successfully." ,
135128 } )
136129 } else {
137-
138130 setSelectedTheme ( selectedTheme )
139131 setTheme ( selectedTheme )
140132 throw new Error ( 'Failed to save theme preference' )
@@ -156,13 +148,10 @@ export default function AppearanceSettings() {
156148
157149 setIsUpdating ( true )
158150 try {
159-
160151 setSelectedFont ( newFont )
161152
162-
163153 document . documentElement . style . fontFamily = getFontFamily ( newFont )
164154
165-
166155 const success = await updateUserPreferences ( session . user . id , {
167156 font_family : newFont
168157 } )
@@ -173,7 +162,6 @@ export default function AppearanceSettings() {
173162 description : "Font updated successfully." ,
174163 } )
175164 } else {
176-
177165 setSelectedFont ( selectedFont )
178166 document . documentElement . style . fontFamily = getFontFamily ( selectedFont )
179167 throw new Error ( 'Failed to save font preference' )
@@ -203,7 +191,6 @@ export default function AppearanceSettings() {
203191 }
204192 }
205193
206-
207194 useEffect ( ( ) => {
208195 if ( ! isLoading ) {
209196 document . documentElement . style . fontFamily = getFontFamily ( selectedFont )
@@ -378,7 +365,6 @@ export default function AppearanceSettings() {
378365 </ CardDescription >
379366 </ CardHeader >
380367 < CardContent className = "space-y-6" >
381- { /* Accent Color */ }
382368 < div className = "space-y-3" >
383369 < Label className = "text-sm font-medium" > Accent Color</ Label >
384370 < div className = "flex items-center gap-4" >
@@ -403,7 +389,6 @@ export default function AppearanceSettings() {
403389 </ div >
404390 </ div >
405391
406- { /* Border Radius */ }
407392 < div className = "space-y-3" >
408393 < Label className = "text-sm font-medium" > Border Radius</ Label >
409394 < div className = "flex items-center gap-4" >
@@ -425,7 +410,6 @@ export default function AppearanceSettings() {
425410 </ div >
426411 </ div >
427412
428- { /* Interface Options */ }
429413 < div className = "space-y-4" >
430414 < div className = "flex items-center justify-between" >
431415 < div >
@@ -458,7 +442,6 @@ export default function AppearanceSettings() {
458442 </ div >
459443 </ div >
460444
461- { /* Preview */ }
462445 < div className = "space-y-3" >
463446 < Label className = "text-sm font-medium flex items-center gap-2" >
464447 < Eye className = "w-4 h-4" />
@@ -496,7 +479,6 @@ export default function AppearanceSettings() {
496479 </ Card >
497480 ) }
498481
499- { /* Upgrade CTA for free users */ }
500482 { ! hasThemeCustomization && userSubscriptionTier === 'free' && (
501483 < Card className = "border-dashed" >
502484 < CardHeader >
0 commit comments