Новая обработка обновлений в соответствии с новым протоколом предоставляемым SDU серверами
This commit is contained in:
10
app/providers/UpdateProvider/useUpdater.ts
Normal file
10
app/providers/UpdateProvider/useUpdater.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { useContext } from "react";
|
||||
import { UpdateContextValue, UpdateProviderContext } from "./UpdateProvider";
|
||||
|
||||
export function useUpdater() : UpdateContextValue {
|
||||
const context = useContext(UpdateProviderContext);
|
||||
if (!context) {
|
||||
throw new Error("useUpdater must be used within an UpdateProvider");
|
||||
}
|
||||
return context;
|
||||
}
|
||||
Reference in New Issue
Block a user