@vtex/faststore-plugin-buyer-portal 1.1.101 → 1.1.102

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtex/faststore-plugin-buyer-portal",
3
- "version": "1.1.101",
3
+ "version": "1.1.102",
4
4
  "description": "A plugin for faststore with buyer portal",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,4 +1,4 @@
1
- import { isDevelopment } from "../../utils/environment";
1
+ // import { isDevelopment } from "../../utils/environment";
2
2
  import { Icon } from "../Icon";
3
3
 
4
4
  export type ErrorProps = {
@@ -17,15 +17,13 @@ export default function Error({ error, tags }: ErrorProps) {
17
17
  <button data-fs-bp-error-button onClick={() => window.location.reload()}>
18
18
  Try again
19
19
  </button>
20
- {isDevelopment() ? (
21
- <div data-fs-bp-error-details>
22
- <span data-fs-bp-error-details-type>{tags?.errorType}</span>
23
- <h2 data-fs-bp-error-details-title>Error Details</h2>
24
- <p data-fs-bp-error-details-message>{error?.message}</p>
25
- <p data-fs-bp-error-details-stack>Stack: {error?.stack}</p>
26
- <p data-fs-bp-error-details-component>Component: {tags?.component}</p>
27
- </div>
28
- ) : null}
20
+ <div data-fs-bp-error-details>
21
+ <span data-fs-bp-error-details-type>{tags?.errorType}</span>
22
+ <h2 data-fs-bp-error-details-title>Error Details</h2>
23
+ <p data-fs-bp-error-details-message>{error?.message}</p>
24
+ <p data-fs-bp-error-details-stack>Stack: {error?.stack}</p>
25
+ <p data-fs-bp-error-details-component>Component: {tags?.component}</p>
26
+ </div>
29
27
  </div>
30
28
  );
31
29
  }
@@ -1,15 +1,5 @@
1
1
  import { buyerPortalRoutes } from "./buyerPortalRoutes";
2
2
 
3
- const normalizeFinanceLinks = (route: string, contracId: string) => {
4
- const parts = route.split("/").filter(Boolean);
5
-
6
- if (parts.length === 3) {
7
- route += `${contracId}`;
8
- }
9
-
10
- return route;
11
- };
12
-
13
3
  export const getFinanceSettingsLinks = ({
14
4
  orgUnitId,
15
5
  contractId,
@@ -19,16 +9,10 @@ export const getFinanceSettingsLinks = ({
19
9
  }) => [
20
10
  {
21
11
  name: "Budgets",
22
- link: normalizeFinanceLinks(
23
- buyerPortalRoutes.budgets({ orgUnitId, contractId }),
24
- contractId
25
- ),
12
+ link: buyerPortalRoutes.budgets({ orgUnitId, contractId }),
26
13
  },
27
14
  {
28
15
  name: "Buying Policies",
29
- link: normalizeFinanceLinks(
30
- buyerPortalRoutes.buyingPolicies({ orgUnitId, contractId }),
31
- contractId
32
- ),
16
+ link: buyerPortalRoutes.buyingPolicies({ orgUnitId, contractId }),
33
17
  },
34
18
  ];