-
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 pull request #3954 from voxel51/main-merge
Merging main into develop
- Loading branch information
Showing
100 changed files
with
2,709 additions
and
1,012 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.