From c046095bbe43f6b9b905368d77e050e4368d616a Mon Sep 17 00:00:00 2001 From: Ajax Davis Date: Wed, 20 Nov 2024 02:59:08 +1100 Subject: [PATCH] fix lint --- apps/registry/.eslintrc.js | 2 ++ apps/registry/app/jobs/[uuid]/page.js | 20 -------------------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/apps/registry/.eslintrc.js b/apps/registry/.eslintrc.js index b8e28d20..cad1eade 100644 --- a/apps/registry/.eslintrc.js +++ b/apps/registry/.eslintrc.js @@ -9,6 +9,8 @@ module.exports = { '@next/next/no-sync-scripts': 'off', '@next/next/no-page-custom-font': 'off', '@next/next/no-img-element': 'off', + 'react/no-unescaped-entities': 'off', + 'no-case-declarations': 'off', }, env: { browser: true, diff --git a/apps/registry/app/jobs/[uuid]/page.js b/apps/registry/app/jobs/[uuid]/page.js index 6e254cd3..f833b796 100644 --- a/apps/registry/app/jobs/[uuid]/page.js +++ b/apps/registry/app/jobs/[uuid]/page.js @@ -75,26 +75,6 @@ export default function JobPage({ params }) { ); } - const timeAgo = (date) => { - const seconds = Math.floor((new Date() - new Date(date)) / 1000); - const intervals = { - year: 31536000, - month: 2592000, - week: 604800, - day: 86400, - hour: 3600, - minute: 60, - }; - - for (const [unit, secondsInUnit] of Object.entries(intervals)) { - const interval = Math.floor(seconds / secondsInUnit); - if (interval >= 1) { - return interval === 1 ? `1 ${unit} ago` : `${interval} ${unit}s ago`; - } - } - return 'Just now'; - }; - const gptContent = job.gpt_content && job.gpt_content !== 'FAILED' ? JSON.parse(job.gpt_content)