feat: remove analytics tab
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
import { Paper } from '@mui/material';
|
||||
|
||||
export function Analytics() {
|
||||
return (
|
||||
<Paper sx={{ width: '100%', height: 'calc(100vh - 50px)' }}>To do</Paper>
|
||||
);
|
||||
}
|
||||
@@ -13,20 +13,12 @@ test.describe('Home component tests', () => {
|
||||
test('should switch to Dashboard content when Dashboard tab is clicked', async ({
|
||||
page
|
||||
}) => {
|
||||
await page.click('text=Analytics');
|
||||
await page.click('text=Settings');
|
||||
await page.click('text=Dashboard');
|
||||
|
||||
await expect(page.locator('text=Dashboard')).toBeVisible();
|
||||
});
|
||||
|
||||
test('should switch to Analytics content when Analytics tab is clicked', async ({
|
||||
page
|
||||
}) => {
|
||||
await page.click('text=Analytics');
|
||||
|
||||
await expect(page.locator('text=Analytics')).toBeVisible();
|
||||
});
|
||||
|
||||
test('should switch to Settings content when Settings tab is clicked', async ({
|
||||
page
|
||||
}) => {
|
||||
|
||||
10
app/page.tsx
10
app/page.tsx
@@ -4,13 +4,11 @@ import { TabContext, TabList, TabPanel } from '@mui/lab';
|
||||
import { Tab } from '@mui/material';
|
||||
import { Suspense, useState } from 'react';
|
||||
import { ProfileContextProvider } from '../contexts/ProfileContextProvider';
|
||||
import { Analytics } from './components/Analytics/Analytics';
|
||||
import Dashboard from './components/Dashboard/Dashboard';
|
||||
import Settings from './components/Settings/Settings';
|
||||
|
||||
enum TabValue {
|
||||
DASHBOARD = 'DASHBOARD',
|
||||
ANALYTICS = 'ANALYTICS',
|
||||
SETTINGS = 'SETTINGS'
|
||||
}
|
||||
|
||||
@@ -38,11 +36,6 @@ export default function Home() {
|
||||
value={TabValue.DASHBOARD}
|
||||
sx={tabStyle.color(TabValue.DASHBOARD)}
|
||||
/>
|
||||
<Tab
|
||||
label="Analytics"
|
||||
value={TabValue.ANALYTICS}
|
||||
sx={tabStyle.color(TabValue.ANALYTICS)}
|
||||
/>
|
||||
<Tab
|
||||
label="Settings"
|
||||
value={TabValue.SETTINGS}
|
||||
@@ -52,9 +45,6 @@ export default function Home() {
|
||||
<TabPanel sx={tabPanelStyle} value={TabValue.DASHBOARD}>
|
||||
<Dashboard />
|
||||
</TabPanel>
|
||||
<TabPanel sx={tabPanelStyle} value={TabValue.ANALYTICS}>
|
||||
<Analytics />
|
||||
</TabPanel>
|
||||
<TabPanel sx={tabPanelStyle} value={TabValue.SETTINGS}>
|
||||
<Settings />
|
||||
</TabPanel>
|
||||
|
||||
Reference in New Issue
Block a user