diff --git a/src/components/header/ConversationMessageSettingButton.tsx b/src/components/header/ConversationMessageSettingButton.tsx new file mode 100644 index 00000000..324d2e68 --- /dev/null +++ b/src/components/header/ConversationMessageSettingButton.tsx @@ -0,0 +1,23 @@ +import { useStore } from '@nanostores/solid' +import { showConversationEditModal } from '@/stores/ui' +import { currentConversationId } from '@/stores/conversation' + +export default () => { + // Retrieve the current conversation ID from the store + const $currentConversationId = useStore(currentConversationId) + + return ( + <> + {/* Render the following code if the current conversation ID exists */} + {$currentConversationId() && ( +
{ showConversationEditModal.set(true) }} + > + {/* Render the carbon settings adjust icon */} +
+
+ )} + + ) +} diff --git a/src/components/header/Header.tsx b/src/components/header/Header.tsx index 098c6b49..f0c4f809 100644 --- a/src/components/header/Header.tsx +++ b/src/components/header/Header.tsx @@ -4,6 +4,7 @@ import { useLargeScreen } from '@/hooks' import ConversationHeaderInfo from './ConversationHeaderInfo' import ConversationMessageClearButton from './ConversationMessageClearButton' import ConversationMessageShareButton from './ConversationMessageShareButton' +import ConversationMessageSettingButton from './ConversationMessageSettingButton' export default () => { onMount(() => { @@ -25,6 +26,7 @@ export default () => {
+