Rename peoples page

Signed-off-by: gearnode <bryan@frimin.fr>
This commit is contained in:
gearnode
2025-02-12 09:24:12 -08:00
parent 8291217b93
commit b6ad7c9252
3 changed files with 26 additions and 26 deletions

View File

@@ -23,7 +23,7 @@ posthog.init(process.env.POSTHOG_KEY!, {
const HomePage = lazy(() => import("./pages/HomePage")); const HomePage = lazy(() => import("./pages/HomePage"));
const NotFoundPage = lazy(() => import("./pages/NotFoundPage")); const NotFoundPage = lazy(() => import("./pages/NotFoundPage"));
const PeoplesPage = lazy(() => import("./pages/PeoplesPage")); const PeopleListPage = lazy(() => import("./pages/PeopleListPage"));
const VendorListPage = lazy(() => import("./pages/VendorListPage")); const VendorListPage = lazy(() => import("./pages/VendorListPage"));
const FrameworksPage = lazy(() => import("./pages/FrameworksPage")); const FrameworksPage = lazy(() => import("./pages/FrameworksPage"));
const FrameworkOverviewPage = lazy(() => import("./pages/FrameworkOverviewPage")); const FrameworkOverviewPage = lazy(() => import("./pages/FrameworkOverviewPage"));
@@ -61,7 +61,7 @@ function App() {
element={ element={
<Suspense> <Suspense>
<ErrorBoundary> <ErrorBoundary>
<PeoplesPage /> <PeopleListPage />
</ErrorBoundary> </ErrorBoundary>
</Suspense> </Suspense>
} }

View File

@@ -8,10 +8,10 @@ import {
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
import { Badge } from "@/components/ui/badge"; import { Badge } from "@/components/ui/badge";
import { CircleUser, Globe, Shield } from "lucide-react"; import { CircleUser, Globe, Shield } from "lucide-react";
import type { PeoplesPageQuery as PeoplesPageQueryType } from "./__generated__/PeoplesPageQuery.graphql"; import type { PeopleListPageQuery as PeopleListPageQueryType } from "./__generated__/PeopleListPageQuery.graphql";
const PeoplesPageQuery = graphql` const PeopleListPageQuery = graphql`
query PeoplesPageQuery { query PeopleListPageQuery {
node(id: "AZSfP_xAcAC5IAAAAAAltA") { node(id: "AZSfP_xAcAC5IAAAAAAltA") {
id id
... on Organization { ... on Organization {
@@ -32,12 +32,12 @@ const PeoplesPageQuery = graphql`
} }
`; `;
function PeoplesPageContent({ function PeopleListPageContent({
queryRef, queryRef,
}: { }: {
queryRef: PreloadedQuery<PeoplesPageQueryType>; queryRef: PreloadedQuery<PeopleListPageQueryType>;
}) { }) {
const data = usePreloadedQuery(PeoplesPageQuery, queryRef); const data = usePreloadedQuery(PeopleListPageQuery, queryRef);
const peoples = data.node.peoples?.edges.map(edge => edge?.node) ?? []; const peoples = data.node.peoples?.edges.map(edge => edge?.node) ?? [];
return ( return (
@@ -83,7 +83,7 @@ function PeoplesPageContent({
); );
} }
function PeoplesPageFallback() { function PeopleListPageFallback() {
return ( return (
<div className="p-6 space-y-6"> <div className="p-6 space-y-6">
<div className="space-y-1"> <div className="space-y-1">
@@ -119,20 +119,20 @@ function PeoplesPageFallback() {
); );
} }
export default function PeoplesPage() { export default function PeopleListPage() {
const [queryRef, loadQuery] = useQueryLoader<PeoplesPageQueryType>(PeoplesPageQuery); const [queryRef, loadQuery] = useQueryLoader<PeopleListPageQueryType>(PeopleListPageQuery);
useEffect(() => { useEffect(() => {
loadQuery({}); loadQuery({});
}, [loadQuery]); }, [loadQuery]);
if (!queryRef) { if (!queryRef) {
return <PeoplesPageFallback />; return <PeopleListPageFallback />;
} }
return ( return (
<Suspense fallback={<PeoplesPageFallback />}> <Suspense fallback={<PeopleListPageFallback />}>
<PeoplesPageContent queryRef={queryRef} /> <PeopleListPageContent queryRef={queryRef} />
</Suspense> </Suspense>
); );
} }

View File

@@ -1,5 +1,5 @@
/** /**
* @generated SignedSource<<e0bd568420e8442ebe1e1f968d206979>> * @generated SignedSource<<2ba907db688f627158201c0998785612>>
* @lightSyntaxTransform * @lightSyntaxTransform
* @nogrep * @nogrep
*/ */
@@ -9,8 +9,8 @@
// @ts-nocheck // @ts-nocheck
import { ConcreteRequest } from 'relay-runtime'; import { ConcreteRequest } from 'relay-runtime';
export type PeoplesPageQuery$variables = Record<PropertyKey, never>; export type PeopleListPageQuery$variables = Record<PropertyKey, never>;
export type PeoplesPageQuery$data = { export type PeopleListPageQuery$data = {
readonly node: { readonly node: {
readonly id: string; readonly id: string;
readonly peoples?: { readonly peoples?: {
@@ -27,9 +27,9 @@ export type PeoplesPageQuery$data = {
}; };
}; };
}; };
export type PeoplesPageQuery = { export type PeopleListPageQuery = {
response: PeoplesPageQuery$data; response: PeopleListPageQuery$data;
variables: PeoplesPageQuery$variables; variables: PeopleListPageQuery$variables;
}; };
const node: ConcreteRequest = (function(){ const node: ConcreteRequest = (function(){
@@ -128,7 +128,7 @@ return {
"argumentDefinitions": [], "argumentDefinitions": [],
"kind": "Fragment", "kind": "Fragment",
"metadata": null, "metadata": null,
"name": "PeoplesPageQuery", "name": "PeopleListPageQuery",
"selections": [ "selections": [
{ {
"alias": null, "alias": null,
@@ -151,7 +151,7 @@ return {
"operation": { "operation": {
"argumentDefinitions": [], "argumentDefinitions": [],
"kind": "Operation", "kind": "Operation",
"name": "PeoplesPageQuery", "name": "PeopleListPageQuery",
"selections": [ "selections": [
{ {
"alias": null, "alias": null,
@@ -176,16 +176,16 @@ return {
] ]
}, },
"params": { "params": {
"cacheID": "98a9fdbb092f803bd997c417aed8b9a4", "cacheID": "ce78c7ac266c38015ae2d44366f19579",
"id": null, "id": null,
"metadata": {}, "metadata": {},
"name": "PeoplesPageQuery", "name": "PeopleListPageQuery",
"operationKind": "query", "operationKind": "query",
"text": "query PeoplesPageQuery {\n node(id: \"AZSfP_xAcAC5IAAAAAAltA\") {\n __typename\n id\n ... on Organization {\n peoples {\n edges {\n node {\n id\n fullName\n primaryEmailAddress\n additionalEmailAddresses\n createdAt\n updatedAt\n }\n }\n }\n }\n }\n}\n" "text": "query PeopleListPageQuery {\n node(id: \"AZSfP_xAcAC5IAAAAAAltA\") {\n __typename\n id\n ... on Organization {\n peoples {\n edges {\n node {\n id\n fullName\n primaryEmailAddress\n additionalEmailAddresses\n createdAt\n updatedAt\n }\n }\n }\n }\n }\n}\n"
} }
}; };
})(); })();
(node as any).hash = "72495143e41518eb0c6bc2e1af81bded"; (node as any).hash = "a3892026d3bf2753f6d1ff00ddf0526c";
export default node; export default node;