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 ({
|
test('should switch to Dashboard content when Dashboard tab is clicked', async ({
|
||||||
page
|
page
|
||||||
}) => {
|
}) => {
|
||||||
await page.click('text=Analytics');
|
await page.click('text=Settings');
|
||||||
await page.click('text=Dashboard');
|
await page.click('text=Dashboard');
|
||||||
|
|
||||||
await expect(page.locator('text=Dashboard')).toBeVisible();
|
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 ({
|
test('should switch to Settings content when Settings tab is clicked', async ({
|
||||||
page
|
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 { Tab } from '@mui/material';
|
||||||
import { Suspense, useState } from 'react';
|
import { Suspense, useState } from 'react';
|
||||||
import { ProfileContextProvider } from '../contexts/ProfileContextProvider';
|
import { ProfileContextProvider } from '../contexts/ProfileContextProvider';
|
||||||
import { Analytics } from './components/Analytics/Analytics';
|
|
||||||
import Dashboard from './components/Dashboard/Dashboard';
|
import Dashboard from './components/Dashboard/Dashboard';
|
||||||
import Settings from './components/Settings/Settings';
|
import Settings from './components/Settings/Settings';
|
||||||
|
|
||||||
enum TabValue {
|
enum TabValue {
|
||||||
DASHBOARD = 'DASHBOARD',
|
DASHBOARD = 'DASHBOARD',
|
||||||
ANALYTICS = 'ANALYTICS',
|
|
||||||
SETTINGS = 'SETTINGS'
|
SETTINGS = 'SETTINGS'
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,11 +36,6 @@ export default function Home() {
|
|||||||
value={TabValue.DASHBOARD}
|
value={TabValue.DASHBOARD}
|
||||||
sx={tabStyle.color(TabValue.DASHBOARD)}
|
sx={tabStyle.color(TabValue.DASHBOARD)}
|
||||||
/>
|
/>
|
||||||
<Tab
|
|
||||||
label="Analytics"
|
|
||||||
value={TabValue.ANALYTICS}
|
|
||||||
sx={tabStyle.color(TabValue.ANALYTICS)}
|
|
||||||
/>
|
|
||||||
<Tab
|
<Tab
|
||||||
label="Settings"
|
label="Settings"
|
||||||
value={TabValue.SETTINGS}
|
value={TabValue.SETTINGS}
|
||||||
@@ -52,9 +45,6 @@ export default function Home() {
|
|||||||
<TabPanel sx={tabPanelStyle} value={TabValue.DASHBOARD}>
|
<TabPanel sx={tabPanelStyle} value={TabValue.DASHBOARD}>
|
||||||
<Dashboard />
|
<Dashboard />
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
<TabPanel sx={tabPanelStyle} value={TabValue.ANALYTICS}>
|
|
||||||
<Analytics />
|
|
||||||
</TabPanel>
|
|
||||||
<TabPanel sx={tabPanelStyle} value={TabValue.SETTINGS}>
|
<TabPanel sx={tabPanelStyle} value={TabValue.SETTINGS}>
|
||||||
<Settings />
|
<Settings />
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
|
|||||||
Reference in New Issue
Block a user