Adapt with new next-auth version
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import {useState, useEffect, useRef} from 'react'
|
||||
import {styled} from '@mui/material/styles'
|
||||
import PropTypes from 'prop-types'
|
||||
import {useSession} from 'next-auth/client'
|
||||
import {useSession} from 'next-auth/react'
|
||||
|
||||
import {
|
||||
IconButton,
|
||||
@@ -48,7 +48,7 @@ export default function VweKomante({komante, teks}) {
|
||||
const [esOuve, meteEsOuve] = useState(false)
|
||||
const [esKoneksyonOuve, meteEsKoneksyonOuve] = useState(false)
|
||||
const [esKomenteOuve, meteEsKomanteOuve] = useState(false)
|
||||
const [session] = useSession()
|
||||
const {data: session} = useSession()
|
||||
const router = useRouter()
|
||||
|
||||
const handleClick = () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {useState} from 'react'
|
||||
import {styled} from '@mui/material/styles'
|
||||
import PropTypes from 'prop-types'
|
||||
import {signOut} from 'next-auth/client'
|
||||
import {signOut} from 'next-auth/react'
|
||||
import {Tooltip, Fab, Zoom} from '@mui/material'
|
||||
import ExitToAppIcon from '@mui/icons-material/ExitToApp'
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {useEffect, useState, forwardRef} from 'react'
|
||||
import {signIn} from 'next-auth/client'
|
||||
import {signIn} from 'next-auth/react'
|
||||
import {useRouter} from 'next/router'
|
||||
import PropTypes from 'prop-types'
|
||||
import Link from 'next/link'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import PropTypes from 'prop-types'
|
||||
import Link from 'next/link'
|
||||
import {signIn} from 'next-auth/client'
|
||||
import {signIn} from 'next-auth/react'
|
||||
import {Button} from '@mui/material'
|
||||
|
||||
export default function LoginProvider({id, title, icon, callbackUrl}) {
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
import {styled} from '@mui/material/styles'
|
||||
import MuiAlert from '@mui/material/Alert'
|
||||
import ExplicitIcon from '@mui/icons-material/Explicit'
|
||||
import {useSession} from 'next-auth/client'
|
||||
import {useSession} from 'next-auth/react'
|
||||
|
||||
import {formatJsonString} from '../../lib/utils/format'
|
||||
|
||||
@@ -116,7 +116,7 @@ const ExplicitTooltip = Tooltip
|
||||
|
||||
export default function Teks({anTeks, komante, open, success, error, setSuccess, setError, handleClose}) {
|
||||
const isMobile = useMediaQuery('(max-width:800px)')
|
||||
const [session] = useSession()
|
||||
const {data: session} = useSession()
|
||||
const langArray = langToArray(anTeks)
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user