Skip to content

Commit 8d7657e

Browse files
committed
update icon and orama ui components
1 parent ff59f5b commit 8d7657e

File tree

6 files changed

+54
-119
lines changed

6 files changed

+54
-119
lines changed

apps/site/components/Common/Searchbox/Chat/index.tsx

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,18 @@ export const SlidingChatPanel: FC<SlidingChatPanelProps> = ({
6262
onNewInteraction={() => scrollToBottom({ animated: true })}
6363
className={styles.chatInteractionsWrapper}
6464
>
65-
{(interaction, index, totalInteractions) => (
66-
<>
67-
<ChatInteractions.UserPrompt
68-
className={styles.chatUserPrompt}
69-
>
70-
<p>{interaction.query}</p>
71-
</ChatInteractions.UserPrompt>
65+
{(interaction, index, totalInteractions) =>
66+
interaction && (
67+
<>
68+
<ChatInteractions.UserPrompt
69+
className={styles.chatUserPrompt}
70+
>
71+
<p>{interaction.query}</p>
72+
</ChatInteractions.UserPrompt>
73+
<ChatInteractions.Loading interaction={interaction}>
74+
<Skeleton className={styles.chatLoader} />
75+
</ChatInteractions.Loading>
7276

73-
{interaction.loading && !interaction.response ? (
74-
<Skeleton className={styles.chatLoader} />
75-
) : (
7677
<>
7778
<ChatInteractions.Sources
7879
sources={
@@ -111,13 +112,14 @@ export const SlidingChatPanel: FC<SlidingChatPanelProps> = ({
111112
{interaction.response}
112113
</ChatInteractions.AssistantMessage>
113114

114-
{!interaction.loading && (
115+
<ChatInteractions.Loading interaction={interaction}>
115116
<div className={styles.chatActionsContainer}>
116117
<ul className={styles.chatActionsList}>
117118
{index === totalInteractions && (
118119
<li>
119120
<ChatInteractions.RegenerateLatest
120121
className={styles.chatAction}
122+
interaction={interaction}
121123
>
122124
<ArrowPathRoundedSquareIcon />
123125
</ChatInteractions.RegenerateLatest>
@@ -140,12 +142,12 @@ export const SlidingChatPanel: FC<SlidingChatPanelProps> = ({
140142
</li>
141143
</ul>
142144
</div>
143-
)}
145+
</ChatInteractions.Loading>
144146
</div>
145147
</>
146-
)}
147-
</>
148-
)}
148+
</>
149+
)
150+
}
149151
</ChatInteractions.Wrapper>
150152
</div>
151153
<div className={styles.slidingPanelBottom}>

apps/site/components/Common/Searchbox/Search/index.tsx

Lines changed: 23 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ import {
1212
FacetTabs,
1313
SearchResults,
1414
Suggestions,
15+
OramaLogo,
1516
} from '@orama/ui/components';
1617
import { useSearchContext } from '@orama/ui/contexts';
1718
import classNames from 'classnames';
18-
import Image from 'next/image';
1919
import Link from 'next/link';
2020
import { useLocale, useTranslations } from 'next-intl';
2121
import type { FC, PropsWithChildren } from 'react';
@@ -98,29 +98,27 @@ export const Search: FC<SearchProps> = ({ onChatTrigger }) => {
9898
<p className={styles.suggestionsTitle}>
9999
{t('components.search.suggestions')}
100100
</p>
101-
<Suggestions.List className={styles.suggestionsList}>
102-
<Suggestions.Item
103-
onClick={onChatTrigger}
104-
itemClassName={styles.suggestionItem}
105-
>
106-
<SparklesIcon />
107-
{t('components.search.suggestionOne')}
108-
</Suggestions.Item>
109-
<Suggestions.Item
110-
onClick={onChatTrigger}
111-
itemClassName={styles.suggestionItem}
112-
>
113-
<SparklesIcon />
114-
{t('components.search.suggestionTwo')}
115-
</Suggestions.Item>
116-
<Suggestions.Item
117-
onClick={onChatTrigger}
118-
itemClassName={styles.suggestionItem}
119-
>
120-
<SparklesIcon />
121-
{t('components.search.suggestionThree')}
122-
</Suggestions.Item>
123-
</Suggestions.List>
101+
<Suggestions.Item
102+
onClick={onChatTrigger}
103+
className={styles.suggestionItem}
104+
>
105+
<SparklesIcon />
106+
{t('components.search.suggestionOne')}
107+
</Suggestions.Item>
108+
<Suggestions.Item
109+
onClick={onChatTrigger}
110+
className={styles.suggestionItem}
111+
>
112+
<SparklesIcon />
113+
{t('components.search.suggestionTwo')}
114+
</Suggestions.Item>
115+
<Suggestions.Item
116+
onClick={onChatTrigger}
117+
className={styles.suggestionItem}
118+
>
119+
<SparklesIcon />
120+
{t('components.search.suggestionThree')}
121+
</Suggestions.Item>
124122
</Suggestions.Wrapper>
125123
)}
126124
</>
@@ -213,18 +211,7 @@ export const Search: FC<SearchProps> = ({ onChatTrigger }) => {
213211
data-focus-on-arrow-nav
214212
>
215213
<small>{t('components.search.poweredBy')}</small>
216-
<Image
217-
src="/static/logos/orama-logo-icon.svg"
218-
alt={t('components.search.poweredBy') + ' Orama'}
219-
width="22"
220-
height="15"
221-
/>
222-
<Image
223-
src="/static/logos/orama-logo.svg"
224-
alt={t('components.search.poweredBy') + ' Orama'}
225-
width="62"
226-
height="22"
227-
/>
214+
<OramaLogo theme="dark" />
228215
</a>
229216
</div>
230217
</div>

apps/site/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
"@opentelemetry/sdk-logs": "~0.202.0",
4343
"@orama/react-components": "^0.8.1",
4444
"@oramacloud/client": "^2.1.4",
45-
"@orama/ui": "^0.0.6",
46-
"@orama/core": "^1.0.0-rc.3",
45+
"@orama/ui": "^0.0.7",
46+
"@orama/core": "^1.0.0-rc.5",
4747
"@radix-ui/react-slot": "^1.2.3",
4848
"@radix-ui/react-tabs": "^1.1.12",
4949
"@radix-ui/react-toast": "^1.2.14",

apps/site/public/static/logos/orama-logo-icon.svg

Lines changed: 0 additions & 40 deletions
This file was deleted.

apps/site/public/static/logos/orama-logo.svg

Lines changed: 0 additions & 14 deletions
This file was deleted.

pnpm-lock.yaml

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)