-
Notifications
You must be signed in to change notification settings - Fork 434
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add chat type settings to the header. (#78)
- Loading branch information
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
src/components/header/ConversationMessageSettingButton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() && ( | ||
<div | ||
class="fcc p-2 rounded-md text-xl hv-foreground" | ||
onClick={() => { showConversationEditModal.set(true) }} | ||
> | ||
{/* Render the carbon settings adjust icon */} | ||
<div i-carbon-settings-adjust /> | ||
</div> | ||
)} | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters