Skip to content

Commit e268bf0

Browse files
committed
Add zendesk staging
1 parent 53d180e commit e268bf0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/odie-client/src/components/message/messages-container.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { isTestModeEnvironment } from '@automattic/zendesk-client';
12
import { Spinner } from '@wordpress/components';
23
import { __ } from '@wordpress/i18n';
34
import clx from 'classnames';
@@ -28,6 +29,7 @@ interface ChatMessagesProps {
2829
export const MessagesContainer = ( { currentUser }: ChatMessagesProps ) => {
2930
const { chat, isChatLoaded, isUserEligibleForPaidSupport, forceEmailSupport } =
3031
useOdieAssistantContext();
32+
const isTestMode = isTestModeEnvironment();
3133
const createZendeskConversation = useCreateZendeskConversation();
3234
const [ searchParams, setSearchParams ] = useSearchParams();
3335
const navigate = useNavigate();
@@ -147,7 +149,10 @@ export const MessagesContainer = ( { currentUser }: ChatMessagesProps ) => {
147149
{ chat.provider === 'odie' && chat.status === 'sending' && <ThinkingPlaceholder /> }
148150
{ chat.provider === 'odie' && chat.status === 'transfer' && (
149151
<ThinkingPlaceholder
150-
content={ __( 'Connecting to a live agent…', __i18n_text_domain__ ) }
152+
content={
153+
__( 'Connecting to a live agent…', __i18n_text_domain__ ) +
154+
( isTestMode ? ' (ZENDESK STAGING)' : '' )
155+
}
151156
/>
152157
) }
153158
{ chat.provider.startsWith( 'zendesk' ) && (

0 commit comments

Comments
 (0)