Skip to content

Commit

Permalink
fix(chat): disable new conversation on click when HideNewConversation…
Browse files Browse the repository at this point in the history
… is enabled (Issue #2792) (#2796)
  • Loading branch information
Derikyan authored Dec 12, 2024
1 parent beb4d0e commit ebadd84
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/chat/src/components/Header/Logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,17 @@ export const Logo = () => {
ConversationsSelectors.selectIsConversationsStreaming,
);

const isNewConversationDisabled = useAppSelector((state) =>
SettingsSelectors.isFeatureEnabled(state, Feature.HideNewConversation),
);

const customLogoUrl =
isCustomLogoFeatureEnabled &&
customLogo &&
`/api/${ApiUtils.encodeApiUrl(customLogo)}`;

const createNewConversation = () => {
if (!areConversationsLoaded) return;
if (!areConversationsLoaded || isNewConversationDisabled) return;
dispatch(
ConversationsActions.createNewConversations({
names: [DEFAULT_CONVERSATION_NAME],
Expand Down

0 comments on commit ebadd84

Please sign in to comment.