home
Deskripsi: - list kegiatan terbaru - divisi teraktif - event hari ini - diskusi No Issues
This commit is contained in:
4
src/module/home/lib/api_home.ts
Normal file
4
src/module/home/lib/api_home.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export const funGetHome = async (path?: string) => {
|
||||
const response = await fetch(`/api/home${(path) ? path : ''}`, { next: { tags: ['discussion'] } });
|
||||
return await response.json().catch(() => null);
|
||||
}
|
||||
37
src/module/home/lib/type_home.ts
Normal file
37
src/module/home/lib/type_home.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
export interface IDataHomeKegiatan {
|
||||
id: string
|
||||
title: string
|
||||
desc: string
|
||||
status: string
|
||||
progress: number
|
||||
createdAt: string
|
||||
}
|
||||
|
||||
export interface IDataHomeDivision {
|
||||
id: string
|
||||
name: string
|
||||
jumlah: number
|
||||
}
|
||||
|
||||
export interface IDataHomeEvent {
|
||||
id: string
|
||||
idDivision: string
|
||||
title: string
|
||||
desc: string
|
||||
status: number
|
||||
timeStart: string
|
||||
timeEnd: string
|
||||
dateStart: string
|
||||
dateEnd: string
|
||||
createdAt: string
|
||||
user_name: string
|
||||
}
|
||||
|
||||
export interface IDataHomeDiskusi {
|
||||
id: string
|
||||
idDivision: string
|
||||
desc: string
|
||||
title: string
|
||||
date: string
|
||||
user: string
|
||||
}
|
||||
Reference in New Issue
Block a user