diff --git a/src/components/ApiKeyReminder.tsx b/src/components/ApiKeyReminder.tsx new file mode 100644 index 0000000..6cf19c7 --- /dev/null +++ b/src/components/ApiKeyReminder.tsx @@ -0,0 +1,27 @@ +import React from 'react'; +import { useAppSelector } from '../hooks/redux'; +import { openOptionsPage } from '../utils/chromeUtils'; + +const ApiKeyReminder: React.FC = () => { + const apiKey = useAppSelector(state => state.env.envData.apiKey); + const geminiApiKey = useAppSelector(state => state.env.envData.geminiApiKey); + const aiType = useAppSelector(state => state.env.envData.aiType); + + if ((aiType === 'gemini' && geminiApiKey) || (aiType !== 'gemini' && apiKey)) { + return null; + } + + return ( +