Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
14 views1 page

App Code

Uploaded by

Jatin Arora
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views1 page

App Code

Uploaded by

Jatin Arora
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

import React, { useState } from 'react';

import { Layout } from './components/Layout';


import { OverviewTab } from './components/OverviewTab';
import { NewsExplorerTab } from './components/NewsExplorerTab';
import { GrowthOpportunitiesTab } from './components/GrowthOpportunitiesTab';
import { AdverseMediaTab } from './components/AdverseMediaTab';
import { ClientsTab } from './components/ClientsTab';
import { PipelineTab } from './components/PipelineTab';
import { SettingsTab } from './components/SettingsTab';

export default function App() {


const [activeTab, setActiveTab] = useState('overview');

const renderActiveTab = () => {


switch (activeTab) {
case 'overview':
return <OverviewTab />;
case 'news':
return <NewsExplorerTab />;
case 'growth':
return <GrowthOpportunitiesTab />;
case 'adverse':
return <AdverseMediaTab />;
case 'clients':
return <ClientsTab />;
case 'pipeline':
return <PipelineTab />;
case 'settings':
return <SettingsTab />;
default:
return <OverviewTab />;
}
};

return (
<Layout activeTab={activeTab} onTabChange={setActiveTab}>
{renderActiveTab()}
</Layout>
);
}

You might also like