Skip to content

Commit

Permalink
feat: Replace LiveViewPage with LiveFeedPage and update dependencies (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinWitt authored Jan 7, 2024
1 parent 1deabde commit e84dead
Show file tree
Hide file tree
Showing 7 changed files with 340 additions and 84 deletions.
194 changes: 193 additions & 1 deletion frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion frontend/src/ProjectData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,3 @@ export function filterDuplicateBadSmells(params: BadSmell[]) {
({ snippet }, index) => !ids.includes(snippet, index + 1)
);
}

32 changes: 32 additions & 0 deletions frontend/src/component/StyledBreadCrumb.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { Breadcrumbs, Link, Typography } from '@mui/material';
import React from 'react';

interface BreadcrumbItem {
text: string;
href?: string;
}

interface BreadcrumbsProps {
items: BreadcrumbItem[];
}

function AppBreadcrumbs(props: BreadcrumbsProps) {
const { items } = props;
return (
<Breadcrumbs aria-label="breadcrumb" sx={{ paddingTop: '5px' }}>
{items.map((item, index) =>
item.href ? (
<Link color="inherit" href={item.href} key={index}>
{item.text}
</Link>
) : (
<Typography color="textPrimary" key={index}>
{item.text}
</Typography>
)
)}
</Breadcrumbs>
);
}

export default AppBreadcrumbs;
4 changes: 2 additions & 2 deletions frontend/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { RefactorView } from './pages/RefactorView';
import ResultView from './pages/ResultView';
import reportWebVitals from './reportWebVitals';
import { StatisticPage } from './pages/StatisticsPage';
import { LiveViewPage } from './pages/LiveViewPage';
import { LiveFeedPage } from './pages/LiveFeedPage';
import AboutPage from './pages/Aboutpage';
const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement
Expand All @@ -37,7 +37,7 @@ const router = createBrowserRouter([
},
{
path: '/livefeed',
element: <LiveViewPage />,
element: <LiveFeedPage />,
errorElement: <LandingPage children={<DashBoard />} />,
},
{
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/pages/DashBoard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ export default function DashBoard() {
</Box>
<Box>
<Grid container marginLeft={'5%'}>
<Grid item xs={12}>
</Grid>
<Grid item xs={12}></Grid>
</Grid>
</Box>
</div>
Expand Down
Loading

0 comments on commit e84dead

Please sign in to comment.