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 (
请先设置API密钥以使用总结及翻译功能
); }; export default ApiKeyReminder;