-
Notifications
You must be signed in to change notification settings - Fork 563
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'voxel51:develop' into develop
- Loading branch information
Showing
102 changed files
with
3,227 additions
and
1,030 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 14 additions & 4 deletions
18
app/packages/core/src/components/Modal/Group/DynamicGroup/NestedGroup/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,33 @@ | ||
import * as foq from "@fiftyone/relay"; | ||
import * as fos from "@fiftyone/state"; | ||
import React, { Suspense } from "react"; | ||
import { PreloadedQuery } from "react-relay"; | ||
import { useRecoilValue } from "recoil"; | ||
import { GroupSuspense } from "../../GroupSuspense"; | ||
import { GroupView } from "../../GroupView"; | ||
import { GroupElementsLinkBar } from "../pagination"; | ||
|
||
export const NestedGroup = ({ | ||
queryRef, | ||
}: { | ||
queryRef: PreloadedQuery<foq.paginateSamplesQuery>; | ||
queryRef?: PreloadedQuery<foq.paginateSamplesQuery> | null; | ||
}) => { | ||
const shouldRenderImaVid = useRecoilValue(fos.shouldRenderImaVidLooker); | ||
|
||
if (!queryRef && !shouldRenderImaVid) { | ||
throw new Error("no queryRef provided"); | ||
} | ||
|
||
return ( | ||
<> | ||
<GroupSuspense> | ||
<GroupView /> | ||
</GroupSuspense> | ||
<Suspense> | ||
<GroupElementsLinkBar queryRef={queryRef} /> | ||
</Suspense> | ||
{!shouldRenderImaVid && queryRef && ( | ||
<Suspense> | ||
<GroupElementsLinkBar queryRef={queryRef} /> | ||
</Suspense> | ||
)} | ||
</> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.