mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 09:51:13 -05:00
Fix: Resolve TypeScript errors in settings components
This commit is contained in:
@@ -62,10 +62,10 @@ export function NotificationsTab() {
|
||||
|
||||
if (data) {
|
||||
if (data.email_notifications) {
|
||||
setEmailNotifications(data.email_notifications as EmailNotifications);
|
||||
setEmailNotifications(data.email_notifications as unknown as EmailNotifications);
|
||||
}
|
||||
if (data.push_notifications) {
|
||||
setPushNotifications(data.push_notifications as PushNotifications);
|
||||
setPushNotifications(data.push_notifications as unknown as PushNotifications);
|
||||
}
|
||||
} else {
|
||||
// Initialize preferences if they don't exist
|
||||
@@ -84,8 +84,8 @@ export function NotificationsTab() {
|
||||
.from('user_preferences')
|
||||
.insert([{
|
||||
user_id: user.id,
|
||||
email_notifications: emailNotifications,
|
||||
push_notifications: pushNotifications
|
||||
email_notifications: emailNotifications as any,
|
||||
push_notifications: pushNotifications as any
|
||||
}]);
|
||||
|
||||
if (error) throw error;
|
||||
|
||||
Reference in New Issue
Block a user