diff --git a/components/details/details-content.tsx b/components/details/details-content.tsx index cd905e1..574b6bb 100644 --- a/components/details/details-content.tsx +++ b/components/details/details-content.tsx @@ -21,7 +21,7 @@ type Article = { title: string; }[]; files: { - file_url: string; + fileUrl: string; file_alt: string; }[]; }; @@ -252,9 +252,9 @@ export default function DetailContent() {
- {articleDetail?.files?.[0]?.file_url ? ( + {articleDetail?.files?.[0]?.fileUrl ? ( Berita
@@ -640,7 +638,7 @@ export default function EditArticleForm(props: { isDetail: boolean }) { width={480} height={360} alt={`image-${index}`} - src={file.file_url || "/default-avatar.png"} + src={file.fileUrl || "/default-avatar.png"} className="h-[100px] object-cover w-[150px]" /> @@ -663,7 +661,7 @@ export default function EditArticleForm(props: { isDetail: boolean }) { width={480} height={360} alt={`image-${index}`} - src={file?.file_url || "/default-avatar.png"} + src={file?.fileUrl || "/default-avatar.png"} className="h-[100px] object-cover w-[150px]" /> diff --git a/components/form/login.tsx b/components/form/login.tsx index 50301a3..758b03d 100644 --- a/components/form/login.tsx +++ b/components/form/login.tsx @@ -234,7 +234,7 @@ export default function Login() {
-
+
Masuk ke Portal diff --git a/components/landing-page/breaking-news.tsx b/components/landing-page/breaking-news.tsx index 54f4a5b..096e0a1 100644 --- a/components/landing-page/breaking-news.tsx +++ b/components/landing-page/breaking-news.tsx @@ -15,7 +15,7 @@ type Article = { createdByName: string; thumbnailUrl: string; categories: { title: string }[]; - files: { file_url: string; file_alt: string }[]; + files: { fileUrl: string; file_alt: string }[]; }; export default function BreakingNews() { @@ -89,7 +89,7 @@ export default function BreakingNews() { { const imageUrl = article.thumbnailUrl || - article.files?.[0]?.file_url || + article.files?.[0]?.fileUrl || "/placeholder.png"; const category = @@ -215,7 +215,7 @@ export default function BreakingNews() { {newsArticles?.map((article) => { const imageUrl = article.thumbnailUrl || - article.files?.[0]?.file_url || + article.files?.[0]?.fileUrl || "/placeholder.png"; return ( @@ -295,7 +295,7 @@ export default function BreakingNews() { { const imageUrl = article.thumbnailUrl || - article.files?.[0]?.file_url || + article.files?.[0]?.fileUrl || "/placeholder.png"; const category = diff --git a/service/http-config/axios-base-instance.ts b/service/http-config/axios-base-instance.ts index de3efbe..e5b6e3c 100644 --- a/service/http-config/axios-base-instance.ts +++ b/service/http-config/axios-base-instance.ts @@ -6,7 +6,7 @@ const axiosBaseInstance = axios.create({ baseURL, headers: { "Content-Type": "application/json", - "X-Client-Key": "bb65b1ad-e954-4a1a-b4d0-74df5bb0b640" + "X-Client-Key": "5b64a5b9-b553-469b-8e7d-77f8011a97fe", }, }); diff --git a/service/http-config/axios-interceptor-instance.ts b/service/http-config/axios-interceptor-instance.ts index 422a192..5b8320c 100644 --- a/service/http-config/axios-interceptor-instance.ts +++ b/service/http-config/axios-interceptor-instance.ts @@ -10,7 +10,7 @@ const axiosInterceptorInstance = axios.create({ baseURL, headers: { "Content-Type": "application/json", - "X-Client-Key": "bb65b1ad-e954-4a1a-b4d0-74df5bb0b640" + "X-Client-Key": "5b64a5b9-b553-469b-8e7d-77f8011a97fe", }, withCredentials: true, }); diff --git a/service/http-config/http-base-services.ts b/service/http-config/http-base-services.ts index 755d158..75271b1 100644 --- a/service/http-config/http-base-services.ts +++ b/service/http-config/http-base-services.ts @@ -2,11 +2,11 @@ import axiosBaseInstance from "./axios-base-instance"; const defaultHeaders = { "Content-Type": "application/json", - "X-Client-Key": "bb65b1ad-e954-4a1a-b4d0-74df5bb0b640" + "X-Client-Key": "5b64a5b9-b553-469b-8e7d-77f8011a97fe", }; -export async function httpGet(pathUrl: any, headers?: any) { - console.log("X-HEADERS : ", defaultHeaders) +export async function httpGet(pathUrl: any, headers?: any) { + console.log("X-HEADERS : ", defaultHeaders); const mergedHeaders = { ...defaultHeaders, ...headers, diff --git a/service/http-config/http-interceptor-services.ts b/service/http-config/http-interceptor-services.ts index 4d33d96..bf06dd8 100644 --- a/service/http-config/http-interceptor-services.ts +++ b/service/http-config/http-interceptor-services.ts @@ -5,11 +5,11 @@ import { getCsrfToken } from "../master-user"; const defaultHeaders = { "Content-Type": "application/json", - "X-Client-Key": "bb65b1ad-e954-4a1a-b4d0-74df5bb0b640" + "X-Client-Key": "5b64a5b9-b553-469b-8e7d-77f8011a97fe", }; export async function httpGetInterceptor(pathUrl: any) { - console.log("X-HEADERS : ", defaultHeaders) + console.log("X-HEADERS : ", defaultHeaders); const response = await axiosInterceptorInstance .get(pathUrl, { headers: defaultHeaders }) .catch((error) => error.response); @@ -35,7 +35,11 @@ export async function httpGetInterceptor(pathUrl: any) { } } -export async function httpPostInterceptor(pathUrl: any, data: any, headers?: any) { +export async function httpPostInterceptor( + pathUrl: any, + data: any, + headers?: any +) { const resCsrf = await getCsrfToken(); const csrfToken = resCsrf?.data?.csrf_token; @@ -67,7 +71,11 @@ export async function httpPostInterceptor(pathUrl: any, data: any, headers?: any } } -export async function httpPutInterceptor(pathUrl: any, data: any, headers?: any) { +export async function httpPutInterceptor( + pathUrl: any, + data: any, + headers?: any +) { const resCsrf = await getCsrfToken(); const csrfToken = resCsrf?.data?.csrf_token; @@ -99,7 +107,7 @@ export async function httpPutInterceptor(pathUrl: any, data: any, headers?: any) } export async function httpDeleteInterceptor(pathUrl: any, headers?: any) { - const resCsrf = await getCsrfToken(); + const resCsrf = await getCsrfToken(); const csrfToken = resCsrf?.data?.csrf_token; const mergedHeaders = {