From 55d15a90d90a1dfc9df631dd781172dbeb3766e9 Mon Sep 17 00:00:00 2001 From: Everton Ataide Date: Thu, 14 Nov 2024 14:15:09 -0300 Subject: [PATCH] Update hardcoded URL --- CHANGELOG.md | 5 ++++- react/admin/OrganizationsList.tsx | 8 +++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32d6755a..71052e13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,12 +6,15 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Fixed +- Fix action url that was hard coded + ## [1.37.2] - 2024-11-11 ### Fix -- Fixed the change `Is Required` text to `Is Filterable` present in warning +- Fixed the change `Is Required` text to `Is Filterable` present in warning ## [1.37.1] - 2024-11-07 ### Feat diff --git a/react/admin/OrganizationsList.tsx b/react/admin/OrganizationsList.tsx index 3755360c..16999f31 100644 --- a/react/admin/OrganizationsList.tsx +++ b/react/admin/OrganizationsList.tsx @@ -21,6 +21,8 @@ import type { TagProps } from '@vtex/admin-ui' import { Alert, Link, Button } from 'vtex.styleguide' import { FormattedMessage } from 'react-intl' +import { useSessionResponse } from '../modules/session' +import type { Session } from '../modules/session' import { INITIAL_FETCH_LIST_OPTIONS, useOrganizationsList, @@ -45,6 +47,10 @@ const OrganizationsList: FunctionComponent = () => { INITIAL_FETCH_LIST_OPTIONS ) + const session = useSessionResponse() as Session + + const account = session?.namespaces?.account?.accountName?.value + const [isOpenWarning, setIsOpenWarning] = useState(true) const { data: fetchedOrgs, loading, refetch } = useOrganizationsList() @@ -172,7 +178,7 @@ const OrganizationsList: FunctionComponent = () => {