Initial commit
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { request } from './client';
|
||||
import type { Dashboard, Exercise, Lesson, ProgressSummary } from './types';
|
||||
|
||||
export function fetchDashboard() {
|
||||
return request<Dashboard>('/dashboard');
|
||||
}
|
||||
|
||||
export function fetchProgress() {
|
||||
return request<ProgressSummary>('/progress');
|
||||
}
|
||||
|
||||
export function fetchNextLesson() {
|
||||
return request<{ lesson: Lesson; exercise: Exercise }>('/lessons/next', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({})
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user