added admin layout
This commit is contained in:
21
components/auth/logout-button.tsx
Normal file
21
components/auth/logout-button.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
'use client'
|
||||
|
||||
import { logout } from '@/actions/logout'
|
||||
|
||||
interface LogoutButtonProps {
|
||||
children?: React.ReactNode
|
||||
}
|
||||
|
||||
const LogoutButton = ({ children }: LogoutButtonProps) => {
|
||||
const onClick = () => logout()
|
||||
|
||||
return (
|
||||
<span onClick={onClick} className="cursor-pointer">
|
||||
{children}
|
||||
</span>
|
||||
)
|
||||
}
|
||||
|
||||
export default LogoutButton
|
||||
|
||||
|
||||
Reference in New Issue
Block a user