Skip to content

Commit

Permalink
chore: add query to search result subTitle
Browse files Browse the repository at this point in the history
  • Loading branch information
reza-bm committed Nov 29, 2023
1 parent 7d1618b commit 5798859
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions components/search/Result/Result.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ import { SwapType } from 'types';

export interface PropsType {
data: SwapType[];
query: string;
}
4 changes: 2 additions & 2 deletions components/search/Result/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Table from 'components/common/Table';
import { PropsType } from './Result.type';

function Result(props: PropsType) {
const { data } = props;
const { data, query } = props;
return (
<div className="container mt-[3.125rem] rounded-normal bg-baseForeground p-35">
<div className="flex flex-col">
Expand All @@ -11,7 +11,7 @@ function Result(props: PropsType) {
Search Results
</h2>
<p className="text-16 text-neutral-800">
{`Found ${data.length} Rango swaps for this wallet address`}
{`Found ${data.length} Rango swaps for ${query}`}
</p>
</div>
<div className="mt-25">
Expand Down
2 changes: 1 addition & 1 deletion pages/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function Search(props: PropsType) {
{data && (
<>
{data.transactions && data.transactions.length ? (
<Result data={data.transactions} />
<Result data={data.transactions} query={query as string} />
) : (
<NotFound query={query as string} />
)}
Expand Down

0 comments on commit 5798859

Please sign in to comment.