bug fixed

This commit is contained in:
daniel31x13 2024-02-06 07:46:57 -05:00
parent 6252b61b89
commit 392d98f090
6 changed files with 3 additions and 10 deletions

View File

@ -55,8 +55,7 @@ const CollectionItem = ({
active: string; active: string;
collections: CollectionIncludingMembersAndLinkCount[]; collections: CollectionIncludingMembersAndLinkCount[];
}) => { }) => {
const hasChildren = const hasChildren = collections.some((e) => e.parentId === collection.id);
collection.subCollections && collection.subCollections.length > 0;
const router = useRouter(); const router = useRouter();

View File

@ -16,7 +16,6 @@ export default async function getCollectionById(
_count: { _count: {
select: { links: true }, select: { links: true },
}, },
subCollections: true,
members: { members: {
include: { include: {
user: { user: {

View File

@ -75,7 +75,6 @@ export default async function updateCollection(
_count: { _count: {
select: { links: true }, select: { links: true },
}, },
subCollections: true,
members: { members: {
include: { include: {
user: { user: {

View File

@ -12,7 +12,6 @@ export default async function getCollection(userId: number) {
_count: { _count: {
select: { links: true }, select: { links: true },
}, },
subCollections: true,
members: { members: {
include: { include: {
user: { user: {

View File

@ -124,8 +124,7 @@ export default function Index() {
</p> </p>
</div> </div>
{activeCollection.subCollections && {collections.some((e) => e.parentId === activeCollection.id) ? (
activeCollection.subCollections.length > 0 ? (
<details className="mt-2 mb-2"> <details className="mt-2 mb-2">
<summary className="text-sm cursor-pointer select-none"> <summary className="text-sm cursor-pointer select-none">
View Sub-Collections View Sub-Collections
@ -260,8 +259,7 @@ export default function Index() {
<p>{activeCollection?.description}</p> <p>{activeCollection?.description}</p>
) : undefined} ) : undefined}
{/* {activeCollection?.subCollections && {/* {collections.some((e) => e.parentId === activeCollection.id) ? (
activeCollection?.subCollections.length > 0 ? (
<fieldset className="border rounded-md p-2 border-neutral-content"> <fieldset className="border rounded-md p-2 border-neutral-content">
<legend className="text-sm ml-2">Sub-Collections</legend> <legend className="text-sm ml-2">Sub-Collections</legend>
<div className="flex gap-3"> <div className="flex gap-3">

View File

@ -35,7 +35,6 @@ export interface CollectionIncludingMembersAndLinkCount
createdAt?: string; createdAt?: string;
_count?: { links: number }; _count?: { links: number };
members: Member[]; members: Member[];
subCollections: CollectionIncludingMembersAndLinkCount[];
} }
export interface TagIncludingLinkCount extends Tag { export interface TagIncludingLinkCount extends Tag {