---
# System prepended metadata

title: Setting Page

---

# Setting Page


### Data



#### reducer
```
  
const type NotificationType = {
  pushNotifications: boolean,
  likes: boolean,
  comments: boolean,
  directMessages: boolean,
  tagsMentions: boolean,
  newFollowers: boolean,
  newEnrolment: boolean,
  platformUpdates: boolean,
  platformMessages: boolean
}

const type PrivacyType = {
  privateAccount: boolean,
  download?: string,
  comments?: string,
  tagsMentions?: string,
  following?: string,
  likedVideos?: string,
  directMessages?: string
}

interface SliceState {
  notification: NotificationType;
  privacy: PrivacyType;
}
    
const initialState = {
    notification: {} ;
    privacy: {};
} as SliceState;


export const settingSlice = createSlice = {
  name: 'Setting',
  initialState,
  reducer = {
     getNotification:(state,action)=>{
         state.notification = action.payload.data;
     },
     
     updateNotificationToStore:(state,action)=>{
         state.notification = action.payload;
     },
     updateNotificationAsync:()=>{},
}


//actions

export const {getNotification,updateNotification,updateNotificationToStore} = settingSlice.action;
  
 
//selector
 
export const selectNotification = (state) => state.Setting.notification
 

export default settingSlice.reducer;
 

//test

  const notificationSetting= useAppSelector(selectNotification);
  
  pushNotifications: notificationSetting.pushNotifications;
  likes: notificationSetting.like;
  comments: notificationSetting.comments;
  directMessages: notificationSetting.directMessages;
  tagsMentions: notificationSetting.tagsMentions;
  newFollowers: notificationSetting.newFollowers;
  newEnrolment: notificationSetting.newEnrolment;
  platformUpdates: notificationSetting.platformUpdates;
  platforMessages: notificationSetting.platformMessages;