mirror of
https://github.com/towfiqi/serpbear
synced 2025-06-26 18:15:54 +00:00
- Integrates Google Adwords API to generate keywords for a domain. - Adds a New Adwords Integration ui inside the App settings > Integrations screen to integrate Google Adwords. - Adds a New Ideas tab under each domain. - Adds ability to automatically generate keyword ideas based on website content, currently tracked keywords, Currently Ranking keywords or custom keywords - The Keyword Ideas are not saved in database, they are saved in a local file inside the data folder. File naming convention: IDEAS_domain.com.json - The keywords can be marked as favorites, and each time a keyword is favorited, they are added in the IDEAS_domain.com.json file.
54 lines
2.0 KiB
TypeScript
54 lines
2.0 KiB
TypeScript
import React, { useState } from 'react';
|
|
import SearchConsoleSettings from './SearchConsoleSettings';
|
|
import AdWordsSettings from './AdWordsSettings';
|
|
import Icon from '../common/Icon';
|
|
|
|
type IntegrationSettingsProps = {
|
|
settings: SettingsType,
|
|
settingsError: null | {
|
|
type: string,
|
|
msg: string
|
|
},
|
|
updateSettings: Function,
|
|
performUpdate: Function,
|
|
closeSettings: Function
|
|
}
|
|
const IntegrationSettings = ({ settings, settingsError, updateSettings, performUpdate, closeSettings }:IntegrationSettingsProps) => {
|
|
const [currentTab, setCurrentTab] = useState<string>('searchconsole');
|
|
const tabStyle = 'inline-block px-4 py-1 rounded-full mr-3 cursor-pointer text-sm';
|
|
return (
|
|
<div className='settings__content styled-scrollbar p-6 text-sm'>
|
|
<div className='mb-4 '>
|
|
<ul>
|
|
<li
|
|
className={`${tabStyle} ${currentTab === 'searchconsole' ? ' bg-blue-50 text-blue-600' : ''}`}
|
|
onClick={() => setCurrentTab('searchconsole')}>
|
|
<Icon type='google' size={14} /> Search Console
|
|
</li>
|
|
<li
|
|
className={`${tabStyle} ${currentTab === 'adwords' ? ' bg-blue-50 text-blue-600' : ''}`}
|
|
onClick={() => setCurrentTab('adwords')}>
|
|
<Icon type='adwords' size={14} /> Adwords
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div>
|
|
{currentTab === 'searchconsole' && settings && (
|
|
<SearchConsoleSettings settings={settings} updateSettings={updateSettings} settingsError={settingsError} />
|
|
)}
|
|
{currentTab === 'adwords' && settings && (
|
|
<AdWordsSettings
|
|
settings={settings}
|
|
updateSettings={updateSettings}
|
|
settingsError={settingsError}
|
|
performUpdate={performUpdate}
|
|
closeSettings={closeSettings}
|
|
/>
|
|
)}
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default IntegrationSettings;
|