feat: all project setup
This commit is contained in:
21
lib/types/common.ts
Normal file
21
lib/types/common.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
// ============================================================================
|
||||
// Common Types
|
||||
// ============================================================================
|
||||
|
||||
export type LoadingState = "idle" | "loading" | "success" | "error";
|
||||
|
||||
export interface AsyncState<T> {
|
||||
data: T | null;
|
||||
loading: boolean;
|
||||
error: string | null;
|
||||
}
|
||||
|
||||
export interface PaginationParams {
|
||||
page?: number;
|
||||
limit?: number;
|
||||
}
|
||||
|
||||
export interface SortParams {
|
||||
sort_by?: string;
|
||||
order?: "asc" | "desc";
|
||||
}
|
||||
Reference in New Issue
Block a user