@@ -3,7 +3,7 @@ import Router from "next/router"
33import { useState } from "react"
44import { TabPane } from "react-bootstrap"
55import TabContainer from "react-bootstrap/TabContainer"
6- import { useAuth } from "../auth"
6+ import { Frequency , useAuth } from "../auth"
77import { Container , Row , Spinner } from "../bootstrap"
88import {
99 Profile ,
@@ -87,16 +87,16 @@ export function EditProfileForm({
8787
8888 const [ formUpdated , setFormUpdated ] = useState ( false )
8989 const [ settingsModal , setSettingsModal ] = useState < "show" | null > ( null )
90- const [ notifications , setNotifications ] = useState <
91- "Weekly" | "Monthly" | "None "
92- > ( notificationFrequency ? notificationFrequency : "Monthly" )
90+ const [ notifications , setNotifications ] = useState < Frequency > (
91+ notificationFrequency | | "Weekly "
92+ )
9393 const [ isProfilePublic , setIsProfilePublic ] = useState < false | true > (
9494 isPublic ? isPublic : false
9595 )
9696
9797 const onSettingsModalOpen = ( ) => {
9898 setSettingsModal ( "show" )
99- setNotifications ( notificationFrequency ? notificationFrequency : "Monthly ")
99+ setNotifications ( notificationFrequency || "Weekly ")
100100 setIsProfilePublic ( isPublic ? isPublic : false )
101101 }
102102
0 commit comments