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 NotFoundPage = lazy(() => import("./pages/NotFoundPage"));
const PeoplesPage = lazy(() => import("./pages/PeoplesPage"));
const PeopleListPage = lazy(() => import("./pages/PeopleListPage"));
const VendorListPage = lazy(() => import("./pages/VendorListPage"));
const FrameworksPage = lazy(() => import("./pages/FrameworksPage"));
const FrameworkOverviewPage = lazy(() => import("./pages/FrameworkOverviewPage"));
@@ -61,7 +61,7 @@ function App() {
element={
<Suspense>
<ErrorBoundary>
<PeoplesPage />
<PeopleListPage />
</ErrorBoundary>
</Suspense>
}

View File

@@ -8,10 +8,10 @@ import {
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
import { Badge } from "@/components/ui/badge";
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`
query PeoplesPageQuery {
const PeopleListPageQuery = graphql`
query PeopleListPageQuery {
node(id: "AZSfP_xAcAC5IAAAAAAltA") {
id
... on Organization {
@@ -32,12 +32,12 @@ const PeoplesPageQuery = graphql`
}
`;
function PeoplesPageContent({
function PeopleListPageContent({
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) ?? [];
return (
@@ -83,7 +83,7 @@ function PeoplesPageContent({
);
}
function PeoplesPageFallback() {
function PeopleListPageFallback() {
return (
<div className="p-6 space-y-6">
<div className="space-y-1">
@@ -119,20 +119,20 @@ function PeoplesPageFallback() {
);
}
export default function PeoplesPage() {
const [queryRef, loadQuery] = useQueryLoader<PeoplesPageQueryType>(PeoplesPageQuery);
export default function PeopleListPage() {
const [queryRef, loadQuery] = useQueryLoader<PeopleListPageQueryType>(PeopleListPageQuery);
useEffect(() => {
loadQuery({});
}, [loadQuery]);
if (!queryRef) {
return <PeoplesPageFallback />;
return <PeopleListPageFallback />;
}
return (
<Suspense fallback={<PeoplesPageFallback />}>
<PeoplesPageContent queryRef={queryRef} />
<Suspense fallback={<PeopleListPageFallback />}>
<PeopleListPageContent queryRef={queryRef} />
</Suspense>
);
}

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<e0bd568420e8442ebe1e1f968d206979>>
* @generated SignedSource<<2ba907db688f627158201c0998785612>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -9,8 +9,8 @@
// @ts-nocheck
import { ConcreteRequest } from 'relay-runtime';
export type PeoplesPageQuery$variables = Record<PropertyKey, never>;
export type PeoplesPageQuery$data = {
export type PeopleListPageQuery$variables = Record<PropertyKey, never>;
export type PeopleListPageQuery$data = {
readonly node: {
readonly id: string;
readonly peoples?: {
@@ -27,9 +27,9 @@ export type PeoplesPageQuery$data = {
};
};
};
export type PeoplesPageQuery = {
response: PeoplesPageQuery$data;
variables: PeoplesPageQuery$variables;
export type PeopleListPageQuery = {
response: PeopleListPageQuery$data;
variables: PeopleListPageQuery$variables;
};
const node: ConcreteRequest = (function(){
@@ -128,7 +128,7 @@ return {
"argumentDefinitions": [],
"kind": "Fragment",
"metadata": null,
"name": "PeoplesPageQuery",
"name": "PeopleListPageQuery",
"selections": [
{
"alias": null,
@@ -151,7 +151,7 @@ return {
"operation": {
"argumentDefinitions": [],
"kind": "Operation",
"name": "PeoplesPageQuery",
"name": "PeopleListPageQuery",
"selections": [
{
"alias": null,
@@ -176,16 +176,16 @@ return {
]
},
"params": {
"cacheID": "98a9fdbb092f803bd997c417aed8b9a4",
"cacheID": "ce78c7ac266c38015ae2d44366f19579",
"id": null,
"metadata": {},
"name": "PeoplesPageQuery",
"name": "PeopleListPageQuery",
"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;