CodeIssuesDiscussionsWikiPull RequestsProjectsCommitsActionsReleasesContributorsPulse● GatesSecuritySettingsDeploymentsPipelineInsightsAgents✨ Explain✨ Ask AI✨ Workspace✨ Spec✨ Tests▓ Debt Map✨ NL Search🏛 Archaeology
Blame · Line-by-line history
AuthContext.ts
Each line is annotated with the commit that last touched it. Click any SHA to jump to that commit and see the surrounding change.
| 9d7a803 | 1 | import { createContext } from 'react'; |
| 2 | import { type User } from '../api/client'; | |
| 3 | ||
| 4 | export interface AuthContextValue { | |
| 5 | user: User | null; | |
| 6 | token: string | null; | |
| 7 | login: (tokenOrUsername: string, password?: string, host?: string) => Promise<void>; | |
| 8 | logout: () => Promise<void>; | |
| 9 | } | |
| 10 | ||
| 11 | export const AuthContext = createContext<AuthContextValue>({ | |
| 12 | user: null, | |
| 13 | token: null, | |
| 14 | login: async () => {}, | |
| 15 | logout: async () => {}, | |
| 16 | }); |