Skip to content

Commit 167ed0f

Browse files
committed
change cursor
1 parent b3f0f73 commit 167ed0f

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

docs/snippets/ask-ai.jsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@ import { useState } from 'react';
22

33
export const AskAI = () => {
44
const [question, setQuestion] = useState('');
5-
65
const basePrompt = 'Search https://docs.bytez.com and answer: ';
76
const encodedPrompt = encodeURIComponent(basePrompt + question);
8-
97
const links = [
108
{ name: 'ChatGPT', url: `https://chatgpt.com/?q=${encodedPrompt}` },
119
{ name: 'Claude', url: `https://claude.ai/new?q=${encodedPrompt}` },
@@ -33,7 +31,6 @@ export const AskAI = () => {
3331
<p style={{ margin: '0 0 16px 0', opacity: 0.7, fontSize: '0.9rem' }}>
3432
Get instant answers from our docs
3533
</p>
36-
3734
<input
3835
type="text"
3936
placeholder="How do I run a model?"
@@ -58,6 +55,7 @@ export const AskAI = () => {
5855
{links.map(({ name, url }) => (
5956
<a
6057
key={name}
58+
title={question ? undefined : 'Ask a question first'}
6159
href={question ? url : '#'}
6260
target="_blank"
6361
rel="noopener noreferrer"
@@ -74,7 +72,7 @@ export const AskAI = () => {
7472
fontWeight: 500,
7573
fontSize: '0.9rem',
7674
opacity: question ? 1 : 0.5,
77-
cursor: question ? 'pointer' : 'not-allowed',
75+
cursor: question ? 'pointer' : 'text',
7876
transition: 'all 0.2s',
7977
}}
8078
>

0 commit comments

Comments
 (0)