diff --git a/src/config.ts b/src/config.ts index 58fa3920..c0545f6a 100644 --- a/src/config.ts +++ b/src/config.ts @@ -53,14 +53,6 @@ export const config = figue({ default: false, }, }, - tools: { - newTools: { - doc: 'Tool names for tools flagged a as new', - format: 'array', - default: [], - env: 'VITE_NEW_TOOLS', - }, - }, showBanner: { doc: 'Show the banner', format: 'boolean', diff --git a/src/tools/benchmark-builder/index.ts b/src/tools/benchmark-builder/index.ts index b9dcf114..51eb8058 100644 --- a/src/tools/benchmark-builder/index.ts +++ b/src/tools/benchmark-builder/index.ts @@ -8,4 +8,5 @@ export const tool = defineTool({ keywords: ['benchmark', 'builder', 'execution', 'duration', 'mean', 'variance'], component: () => import('./benchmark-builder.vue'), icon: SpeedFilled, + createdAt: new Date('2023-04-05'), }); diff --git a/src/tools/tool.ts b/src/tools/tool.ts index a5d157e9..3bf4e4cc 100644 --- a/src/tools/tool.ts +++ b/src/tools/tool.ts @@ -1,17 +1,10 @@ -import { config } from '@/config'; import { isAfter, subWeeks } from 'date-fns'; import type { Tool } from './tools.types'; type WithOptional = Omit & Partial>; -export function defineTool( - tool: WithOptional, - { newTools }: { newTools: string[] } = { newTools: config.tools.newTools }, -) { - const isInNewToolConfig = newTools.includes(tool.name); - const isRecentTool = tool.createdAt ? isAfter(tool.createdAt, subWeeks(new Date(), 2)) : false; - - const isNew = isInNewToolConfig || isRecentTool; +export function defineTool(tool: WithOptional) { + const isNew = tool.createdAt ? isAfter(tool.createdAt, subWeeks(new Date(), 2)) : false; return { isNew,