Skip to content

Commit c31c3f6

Browse files
committed
⚙️ Improve notFound page + fixed copy source in folder page
1 parent 3d4817f commit c31c3f6

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

website/app/components/card/copyIcon.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ const CopyIconActions = ({ itemName, isFolder, ItemIcon }: CopyIconProps) => {
5252
const handleCopySource = async () => {
5353
setLoading(true);
5454
const itemNameLower = itemName.charAt(0).toLowerCase() + itemName.slice(1);
55-
const jsonUrl = `${appConfig.registryUrl}${itemNameLower}.json`;
55+
const jsonUrl = !isFolder
56+
? `${appConfig.registryUrl}${itemNameLower}.json`
57+
: `${appConfig.registryUrl}folders/${itemNameLower}.json`;
5658

5759
try {
5860
const response = await axios.get(jsonUrl);

website/app/components/notFound.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { buttonVariants } from "@/ui/button";
22
import { containerClasses } from "@/ui/container";
3-
import { BoxIcon } from "lucide-react";
3+
import { BoxIcon, FolderSearchIcon } from "lucide-react";
44
import { cn } from "@/utils";
55
import { Link } from "react-router";
66

@@ -33,7 +33,10 @@ const NotFound = (props: NotFoundProps) => {
3333
variant: "outline",
3434
})}
3535
>
36-
Show all {props.isFolder ? "folders icons" : "files icons"}
36+
<FolderSearchIcon size={18} strokeWidth={1.5} />
37+
<span>
38+
Show all {props.isFolder ? "folders icons" : "files icons"}
39+
</span>
3740
</Link>
3841
</div>
3942
</div>

0 commit comments

Comments
 (0)