"use client"
import { useSetAtom } from "jotai"
import { scopesAtom } from "@/lib/stores/scopes"
import type { Admin } from "@/models/admin"

export default function SetScopes(props: {
  admin: Admin & { scopes: string[] }
}) {
  const setScopes = useSetAtom(scopesAtom)

  console.log("用户权限", props.admin.scopes)
  setScopes(props.admin.scopes)
  return null
}
