Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/llms-txt-hub / packages/auth/src/client/hooks/use-auth.ts |
| Date | Not specified in source |
| Repository | Janady13/llms-txt-hub |
| Revision | e0f4bf978d4df168369c7601d9c5f5ea89e84377 |
| Branch | main |
| Path or archive member | packages/auth/src/client/hooks/use-auth.ts |
| Original SHA-256 | 73b6352a7bf3805b530d6ddd456c4f8b8b276b3007e6d0ca2ed8cd83a39cf558 |
| Git blob SHA | bad861867b2997bd4899d91370ac00a0cb7c30ca |
| Reading-copy SHA-256 | 73b6352a7bf3805b530d6ddd456c4f8b8b276b3007e6d0ca2ed8cd83a39cf558 |
Recovered source transcript
Download complete source text ↓15 lines · 0.3 KB
'use client'
import { useContext } from 'react'
import { AuthContext } from '../context'
export function useAuth() {
const context = useContext(AuthContext)
if (!context) {
throw new Error('useAuth must be used within an AuthProvider')
}
return context
}