mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: various course edition improvements
This commit is contained in:
parent
29219391ea
commit
f524ddb51a
5 changed files with 179 additions and 183 deletions
|
|
@ -34,15 +34,17 @@ export function CourseProvider({ children, courseuuid }: any) {
|
|||
}, [courseStructureData]);
|
||||
|
||||
if (error) return <div>Failed to load course structure</div>;
|
||||
if (!courseStructureData) return <PageLoading/>;
|
||||
if (!courseStructureData) return <PageLoading />;
|
||||
|
||||
return (
|
||||
<CourseContext.Provider value={state}>
|
||||
<CourseDispatchContext.Provider value={dispatch}>
|
||||
{children}
|
||||
</CourseDispatchContext.Provider>
|
||||
</CourseContext.Provider>
|
||||
)
|
||||
if (courseStructureData) {
|
||||
return (
|
||||
<CourseContext.Provider value={state}>
|
||||
<CourseDispatchContext.Provider value={dispatch}>
|
||||
{children}
|
||||
</CourseDispatchContext.Provider>
|
||||
</CourseContext.Provider>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export function useCourse() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue