From bb405d50cf6b7d5ec0ee5d14a0849cf9d32c4bf5 Mon Sep 17 00:00:00 2001 From: pheralb Date: Sun, 26 Jun 2022 18:41:36 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9A=92=EF=B8=8F=20Add=20.slug.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/search.tsx | 2 +- src/components/svgInfo.tsx | 6 +++--- src/interfaces/components.ts | 2 +- src/interfaces/svgData.ts | 2 +- src/pages/index.tsx | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/search.tsx b/src/components/search.tsx index 4de71b9..95d9dfc 100644 --- a/src/components/search.tsx +++ b/src/components/search.tsx @@ -44,7 +44,7 @@ const Search = () => { borderWidth="1px" borderRadius="5px" > - {item.title} + {item.title} {item.title} diff --git a/src/components/svgInfo.tsx b/src/components/svgInfo.tsx index ee22990..d82cd62 100644 --- a/src/components/svgInfo.tsx +++ b/src/components/svgInfo.tsx @@ -49,7 +49,7 @@ const SVGInfo = (props: SVGCardProps) => { borderRadius="10px" > {props.title} { variant="ghost" borderWidth="1px" leftIcon={} - onClick={() => copyToClipboard(props.href)} + onClick={() => copyToClipboard(props.slug)} > Copy to clipboard @@ -72,7 +72,7 @@ const SVGInfo = (props: SVGCardProps) => { leftIcon={} variant="primary" mr="2" - onClick={() => downloadSvg(props.href)} + onClick={() => downloadSvg(props.slug)} > Download .svg diff --git a/src/interfaces/components.ts b/src/interfaces/components.ts index 0045f36..4da1685 100644 --- a/src/interfaces/components.ts +++ b/src/interfaces/components.ts @@ -18,7 +18,7 @@ export interface SVGCardProps { id: number; svg: string; title: string; - href?: string; + slug?: string; url?: string; } diff --git a/src/interfaces/svgData.ts b/src/interfaces/svgData.ts index 40609fa..ba8e4f0 100644 --- a/src/interfaces/svgData.ts +++ b/src/interfaces/svgData.ts @@ -1,6 +1,6 @@ export interface SvgData { id: number; - href: string; + slug: string; title: string; category: string; categories?: string[]; diff --git a/src/pages/index.tsx b/src/pages/index.tsx index af61db9..5dfafae 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -19,7 +19,7 @@ const Home: NextPage = () => { return ( {data.map((svg: SvgData) => ( - + ))} );