'use client'

import { LogOut } from '@payloadcms/ui/icons/LogOut'
import { useConfig } from '@payloadcms/ui/providers/Config'
import React from 'react'

export const Logout: React.FC = () => {
  const config = useConfig()
  const {
    admin: { logoutRoute },
    routes: { admin },
  } = config
  return (
    <a href={`${admin}${logoutRoute}#custom`}>
      <LogOut />
    </a>
  )
}
