refactor: consolidate Tool interface and UUID component
- Moved Tool interface definition from type.ts to index.tsx for better organization. - Renamed UUID component to Tool in uuid.tsx and updated its export. - Removed the now redundant type.ts file.
This commit is contained in:
@@ -1,7 +1,15 @@
|
|||||||
|
import type { ReactNode } from 'react';
|
||||||
import { Hash } from 'lucide-react'
|
import { Hash } from 'lucide-react'
|
||||||
|
|
||||||
import type { Tool } from "./type";
|
import UUID from './uuid'
|
||||||
import { UUID } from './uuid'
|
|
||||||
|
export interface Tool {
|
||||||
|
path: string;
|
||||||
|
name: string;
|
||||||
|
icon: ReactNode;
|
||||||
|
description: string;
|
||||||
|
component: ReactNode;
|
||||||
|
}
|
||||||
|
|
||||||
export const tools: Tool[] = [
|
export const tools: Tool[] = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
import type { ReactNode } from "react";
|
|
||||||
|
|
||||||
export interface Tool {
|
|
||||||
path: string;
|
|
||||||
name: string;
|
|
||||||
icon: ReactNode;
|
|
||||||
description: string;
|
|
||||||
component: ReactNode;
|
|
||||||
}
|
|
||||||
@@ -3,7 +3,7 @@ import { type FC } from "react";
|
|||||||
import * as uuid from 'uuid'
|
import * as uuid from 'uuid'
|
||||||
import { nanoid } from 'nanoid'
|
import { nanoid } from 'nanoid'
|
||||||
|
|
||||||
export const UUID: FC = () => {
|
const Tool: FC = () => {
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col gap-4">
|
<div className="flex flex-col gap-4">
|
||||||
<span className="text-sm text-muted-foreground">Refresh the page to generate new UUID</span>
|
<span className="text-sm text-muted-foreground">Refresh the page to generate new UUID</span>
|
||||||
@@ -19,4 +19,6 @@ export const UUID: FC = () => {
|
|||||||
<span>{nanoid()}</span>
|
<span>{nanoid()}</span>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export default Tool;
|
||||||
Reference in New Issue
Block a user