Skip to content

Commit 940aca0

Browse files
fix: Fix homepage search example for case sensitive search. Fixes #779
1 parent 326bb91 commit 940aca0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/web/src/app/[domain]/search/components/searchLandingPage.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export const SearchLandingPage = async ({
8181
<Query query={`"exit boot"`} domain={domain}>{`"exit boot"`}</Query> <QueryExplanation>(exact match)</QueryExplanation>
8282
</QueryExample>
8383
<QueryExample>
84-
<Query query="TODO case:yes" domain={domain}>TODO <Highlight>case:</Highlight>yes</Query> <QueryExplanation>(case sensitive)</QueryExplanation>
84+
<Query query="TODO" domain={domain} isCaseSensitivityEnabled={true}>TODO</Query> <QueryExplanation>(case sensitive)</QueryExplanation>
8585
</QueryExample>
8686
</HowToSection>
8787
<HowToSection
@@ -158,10 +158,10 @@ const QueryExplanation = ({ children }: { children: React.ReactNode }) => {
158158
)
159159
}
160160

161-
const Query = ({ query, domain, children }: { query: string, domain: string, children: React.ReactNode }) => {
161+
const Query = ({ query, domain, children, isCaseSensitivityEnabled = false }: { query: string, domain: string, children: React.ReactNode, isCaseSensitivityEnabled?: boolean }) => {
162162
return (
163163
<Link
164-
href={`/${domain}/search?query=${query}`}
164+
href={`/${domain}/search?query=${query}${isCaseSensitivityEnabled ? "&isCaseSensitivityEnabled=true" : ""}`}
165165
className="cursor-pointer hover:underline"
166166
>
167167
{children}

0 commit comments

Comments
 (0)