Fix bug home

### No Issue
This commit is contained in:
2026-03-05 16:41:29 +08:00
parent 3bbee15c3a
commit 836ef709d2
3 changed files with 40 additions and 11 deletions

View File

@@ -53,7 +53,7 @@ export default function Application() {
}
}
const onLoadDataJob = async () => {
const onLoadDataJob = async () => {
try {
const response = await apiJobGetAll({
category: "beranda",
@@ -61,21 +61,14 @@ export default function Application() {
const result = response.data
.sort(
(a: any, b: any) =>
new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()
new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime(),
)
.slice(0, 2);
setListData(result);
} catch (error) {
console.log("[ERROR]", error);
}
}
};
useFocusEffect(
useCallback(() => {
onLoadData();
}, [])
);
const checkVersion = async () => {
try {
const response = await apiVersion();