mirror of
https://github.com/zimplexing/OrionTV.git
synced 2026-05-13 19:27:30 +08:00
feat(home): enhance HomeScreen with API configuration checks and error handling
This commit is contained in:
@@ -68,6 +68,7 @@ interface HomeState {
|
||||
loadMoreData: () => Promise<void>;
|
||||
selectCategory: (category: Category) => void;
|
||||
refreshPlayRecords: () => Promise<void>;
|
||||
clearError: () => void;
|
||||
}
|
||||
|
||||
// 内存缓存,应用生命周期内有效
|
||||
@@ -261,6 +262,10 @@ const useHomeStore = create<HomeState>((set, get) => ({
|
||||
|
||||
get().fetchInitialData();
|
||||
},
|
||||
|
||||
clearError: () => {
|
||||
set({ error: null });
|
||||
},
|
||||
}));
|
||||
|
||||
export default useHomeStore;
|
||||
|
||||
Reference in New Issue
Block a user