feat: introduce new app routes with modular structure and enhanced features
Added modular app routes including `login`, `dashboard`, `categories`, `trends`, and `upload`. Introduced reusable components such as `ContentList`, `ContentSkeleton`, and `AppSidebar` for improved UI consistency. Enhanced authentication with `AuthProvider` and implemented lazy loading, dynamic layouts, and infinite scrolling for better performance.
This commit is contained in:
14
frontend/src/services/category.service.ts
Normal file
14
frontend/src/services/category.service.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import api from "@/lib/api";
|
||||
import type { Category } from "@/types/content";
|
||||
|
||||
export const CategoryService = {
|
||||
async getAll(): Promise<Category[]> {
|
||||
const { data } = await api.get<Category[]>("/categories");
|
||||
return data;
|
||||
},
|
||||
|
||||
async getOne(id: string): Promise<Category> {
|
||||
const { data } = await api.get<Category>(`/categories/${id}`);
|
||||
return data;
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user