Skip to content

Commit

Permalink
added uniqueVariant
Browse files Browse the repository at this point in the history
  • Loading branch information
assetmantledevops committed Nov 25, 2024
1 parent de96d7c commit 03277a8
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions react/src/views/Pathways.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,8 @@ import { hookOptions, perPage } from "../utils/library";
// import useEsgobservabilitydemoEsgobservabilitydemo from "../hooks/useEsgobservabilitydemoEsgobservabilitydemo";

export default function Pathways() {
const [Sign1, setSign1] = useState(true);
const [Sign2, setSign2] = useState(false);

const { resetState: latestIndexes } = useResetState();
const { QueryDomainAll, QueryCommerceAll, QueryComplianceAll, QueryGovernanceAll } =
useHdoacommandcenterHdoacommandcenter();
const { QueryDomainAll, QueryFactoryAll } = useHdoacommandcenterHdoacommandcenter();
// DOMAIN VALUES
const domainAll = QueryDomainAll(
{ "pagination.limit": 100, "pagination.offset": 0, "pagination.count_total": true, "pagination.reverse": false },
Expand All @@ -33,9 +29,17 @@ export default function Pathways() {
pharmaPathway: domainLatestValue?.pharmaPathway || false,
pathModelling: domainLatestValue?.pathModelling || false,
};

// Change below state to change U shape to single line and vice-versa
const [UIChangeState, setUIChangeState] = useState(false);
// FACTORY MODE VALUES
const factoryModeAll = QueryFactoryAll(
{ "pagination.limit": 100, "pagination.offset": 0, "pagination.count_total": true, "pagination.reverse": false },
hookOptions,
perPage,
);
const factoryModeLatestIndex = isNaN(Number(latestIndexes[2])) ? 0 : Number(latestIndexes[2]);
const factoryModeLatestValue = factoryModeAll?.data?.pages?.[0]?.Factory?.[factoryModeLatestIndex] || {};
const factoryModeInitValue = {
mode: factoryModeLatestValue?.mode || 0,
};

const DATA = {
title: "Title Here",
Expand All @@ -53,7 +57,7 @@ export default function Pathways() {
state: "completed",
},
{
title: "Administrative Stuff",
title: "Administrative Staff",
hash: "asdfjakjhwnan",
primaryKey: "asdfjakjhwnan",
otherKey: "asdfjakjhwnan",
Expand Down Expand Up @@ -101,7 +105,7 @@ export default function Pathways() {
state: "completed",
},
{
title: "Administrative Stuff",
title: "Administrative Staff",
hash: "asdfjakjhwnan",
primaryKey: "asdfjakjhwnan",
otherKey: "asdfjakjhwnan",
Expand Down Expand Up @@ -142,6 +146,8 @@ export default function Pathways() {
],
};

const uniqueVariant = factoryModeInitValue?.mode || 0;

return (
<div className="am-esg-traceability">
<main className="am-bg-translucent">
Expand Down

0 comments on commit 03277a8

Please sign in to comment.