import { Button, Divider, Input, Option, Select, Typography } from '@mui/joy' import { useContext, useEffect, useState } from 'react' import { UserContext } from '../../contexts/UserContext' import { GetUserProfile, UpdateUserDetails } from '../../utils/Fetcher' const NotificationSetting = () => { const { userProfile, setUserProfile } = useContext(UserContext) useEffect(() => { if (!userProfile) { GetUserProfile().then(resp => { resp.json().then(data => { setUserProfile(data.res) setChatID(data.res.chatID) }) }) } }, []) const [chatID, setChatID] = useState(userProfile?.chatID) return (
Notification Settings Manage your notification settings You need to initiate a message to the bot in order for the Telegram notification to work{' '} Click here {' '} to start a chat setChatID(e.target.value)} placeholder='User ID / Chat ID' sx={{ width: '200px', }} /> If you don't know your Chat ID, start chat with userinfobot and it will send you your Chat ID.{' '} Click here {' '} to start chat with userinfobot{' '}
) } export default NotificationSetting