Merge branch 'dev' into fixes
This commit is contained in:
@@ -1,12 +1,4 @@
|
||||
import { CollectionIncludingMembersAndLinkCount } from "@/types/global";
|
||||
import { Dispatch, SetStateAction } from "react";
|
||||
|
||||
const getPublicCollectionData = async (
|
||||
collectionId: number,
|
||||
setData: Dispatch<
|
||||
SetStateAction<CollectionIncludingMembersAndLinkCount | undefined>
|
||||
>
|
||||
) => {
|
||||
const getPublicCollectionData = async (collectionId: number) => {
|
||||
const res = await fetch("/api/v1/public/collections/" + collectionId);
|
||||
|
||||
if (res.status === 400)
|
||||
@@ -14,8 +6,6 @@ const getPublicCollectionData = async (
|
||||
|
||||
const data = await res.json();
|
||||
|
||||
setData(data.response);
|
||||
|
||||
return data;
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
import * as Icons from "@phosphor-icons/react";
|
||||
import { icons as iconData } from "@phosphor-icons/core";
|
||||
import { IconEntry as CoreEntry } from "@phosphor-icons/core";
|
||||
|
||||
interface IconEntry extends CoreEntry {
|
||||
Icon: Icons.Icon;
|
||||
}
|
||||
|
||||
export const icons: ReadonlyArray<IconEntry> = iconData.map((entry) => ({
|
||||
...entry,
|
||||
Icon: Icons[entry.pascal_name as keyof typeof Icons] as Icons.Icon,
|
||||
}));
|
||||
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
console.log(`${icons.length} icons`);
|
||||
}
|
||||
|
||||
export const iconCount = Intl.NumberFormat("en-US").format(icons.length * 6);
|
||||
Reference in New Issue
Block a user