mirror of
https://github.com/pheralb/svgl.git
synced 2025-02-06 06:58:04 +08:00
⚒️ Add .slug.
This commit is contained in:
parent
d5fc23117e
commit
bb405d50cf
@ -44,7 +44,7 @@ const Search = () => {
|
|||||||
borderWidth="1px"
|
borderWidth="1px"
|
||||||
borderRadius="5px"
|
borderRadius="5px"
|
||||||
>
|
>
|
||||||
<Image width="20px" mr="2" src={item.href} alt={item.title} />
|
<Image width="20px" mr="2" src={item.slug} alt={item.title} />
|
||||||
<Text>{item.title}</Text>
|
<Text>{item.title}</Text>
|
||||||
</Flex>
|
</Flex>
|
||||||
</CustomLink>
|
</CustomLink>
|
||||||
|
@ -49,7 +49,7 @@ const SVGInfo = (props: SVGCardProps) => {
|
|||||||
borderRadius="10px"
|
borderRadius="10px"
|
||||||
>
|
>
|
||||||
<Image
|
<Image
|
||||||
src={props.href}
|
src={props.slug}
|
||||||
alt={props.title}
|
alt={props.title}
|
||||||
fit="cover"
|
fit="cover"
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
@ -63,7 +63,7 @@ const SVGInfo = (props: SVGCardProps) => {
|
|||||||
variant="ghost"
|
variant="ghost"
|
||||||
borderWidth="1px"
|
borderWidth="1px"
|
||||||
leftIcon={<Copy />}
|
leftIcon={<Copy />}
|
||||||
onClick={() => copyToClipboard(props.href)}
|
onClick={() => copyToClipboard(props.slug)}
|
||||||
>
|
>
|
||||||
Copy to clipboard
|
Copy to clipboard
|
||||||
</Button>
|
</Button>
|
||||||
@ -72,7 +72,7 @@ const SVGInfo = (props: SVGCardProps) => {
|
|||||||
leftIcon={<DownloadSimple />}
|
leftIcon={<DownloadSimple />}
|
||||||
variant="primary"
|
variant="primary"
|
||||||
mr="2"
|
mr="2"
|
||||||
onClick={() => downloadSvg(props.href)}
|
onClick={() => downloadSvg(props.slug)}
|
||||||
>
|
>
|
||||||
Download .svg
|
Download .svg
|
||||||
</Button>
|
</Button>
|
||||||
|
@ -18,7 +18,7 @@ export interface SVGCardProps {
|
|||||||
id: number;
|
id: number;
|
||||||
svg: string;
|
svg: string;
|
||||||
title: string;
|
title: string;
|
||||||
href?: string;
|
slug?: string;
|
||||||
url?: string;
|
url?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
export interface SvgData {
|
export interface SvgData {
|
||||||
id: number;
|
id: number;
|
||||||
href: string;
|
slug: string;
|
||||||
title: string;
|
title: string;
|
||||||
category: string;
|
category: string;
|
||||||
categories?: string[];
|
categories?: string[];
|
||||||
|
@ -19,7 +19,7 @@ const Home: NextPage = () => {
|
|||||||
return (
|
return (
|
||||||
<Grid>
|
<Grid>
|
||||||
{data.map((svg: SvgData) => (
|
{data.map((svg: SvgData) => (
|
||||||
<SVGCard key={svg.id} id={svg.id} svg={svg.href} title={svg.title} />
|
<SVGCard key={svg.id} id={svg.id} svg={svg.slug} title={svg.title} />
|
||||||
))}
|
))}
|
||||||
</Grid>
|
</Grid>
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user