Make English the repository working language (#5)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -75,6 +75,6 @@ export function AuthProvider({ children }: { children: ReactNode }) {
|
||||
|
||||
export function useAuth(): AuthContextValue {
|
||||
const ctx = useContext(AuthContext);
|
||||
if (!ctx) throw new Error("useAuth 必须在 AuthProvider 内使用");
|
||||
if (!ctx) throw new Error("useAuth must be used within an AuthProvider");
|
||||
return ctx;
|
||||
}
|
||||
|
||||
@@ -88,6 +88,6 @@ export function LocaleScope({ children }: { children: ReactNode }) {
|
||||
|
||||
export function useLocale(): LocaleContextValue {
|
||||
const ctx = useContext(LocaleContext);
|
||||
if (!ctx) throw new Error("useLocale 必须在 LocaleProvider 内使用");
|
||||
if (!ctx) throw new Error("useLocale must be used within a LocaleProvider");
|
||||
return ctx;
|
||||
}
|
||||
|
||||
@@ -154,6 +154,6 @@ export function ProjectProvider({ children }: { children: ReactNode }) {
|
||||
|
||||
export function useProject(): ProjectContextValue {
|
||||
const ctx = useContext(ProjectContext);
|
||||
if (!ctx) throw new Error("useProject 必须在 ProjectProvider 内使用");
|
||||
if (!ctx) throw new Error("useProject must be used within a ProjectProvider");
|
||||
return ctx;
|
||||
}
|
||||
|
||||
@@ -158,6 +158,6 @@ export function SessionsProvider({ children }: { children: ReactNode }) {
|
||||
|
||||
export function useSessions(): SessionsContextValue {
|
||||
const ctx = useContext(SessionsContext);
|
||||
if (!ctx) throw new Error("useSessions 必须在 SessionsProvider 内使用");
|
||||
if (!ctx) throw new Error("useSessions must be used within a SessionsProvider");
|
||||
return ctx;
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ export function ThemeProvider({ children }: { children: ReactNode }) {
|
||||
|
||||
export function useTheme(): ThemeContextValue {
|
||||
const ctx = useContext(ThemeContext);
|
||||
if (!ctx) throw new Error("useTheme 必须在 ThemeProvider 内使用");
|
||||
if (!ctx) throw new Error("useTheme must be used within a ThemeProvider");
|
||||
return ctx;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user