"use client"

import { signOut, useSession } from "next-auth/react"

export function SessionRefresher() {
  const session = useSession()
  if (session.data?.error === "RefreshAccessTokenError") {
    signOut({ redirect: false })
  }

  return null
}
