Skip to content

Commit

Permalink
tiny changes
Browse files Browse the repository at this point in the history
  • Loading branch information
stone-w4tch3r committed Jun 26, 2024
1 parent 16d351f commit 79ab955
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions web/src/chartModule/ChartPage.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, {useState} from 'react';
import {Box, CircularProgress, Grid, Typography} from '@mui/material';
import {Navbar} from './components/Navbar.tsx';
import {Topbar} from './components/Topbar.tsx';
import {Footer} from "./components/Footer.tsx";
import {ChartControls, ChartCard} from "./components/Cards.tsx";
import {useFetchRoute} from "./useFetchRoute.ts";
Expand All @@ -10,7 +10,7 @@ const ChartPage: React.FC = () => {
const {chartName, points, tracks, isLoading, error, fetchRoute} = useFetchRoute(numPoints);

return <Box sx={{display: 'flex', flexDirection: 'column', minHeight: '100vh'}}>
<Navbar/>
<Topbar/>
<Box sx={{py: 5, px: 5, flexGrow: 1}}>
<Grid container spacing={5}>
<Grid item xs={12} md={8}>
Expand Down
2 changes: 1 addition & 1 deletion web/src/chartModule/components/Cards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface IChartParams {

export const ChartCard: React.FC<{ params: IChartParams }> = ({params: {points, tracks, isLoading, error}}) => {
return <StyledCard>
<CardHeader title="Sales Chart"/>
<CardHeader title="Route Chart"/>
<CardContent sx={{width: "100%", height: "100%", p: 0}}>
{renderChartCardContent({points, tracks, isLoading, error})}
</CardContent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const GradientAppBar = styled(AppBar)({
background: 'linear-gradient(90deg, rgba(1,109,213,1) 0%, rgba(1,61,143,1) 100%)',
});

export const Navbar: React.FC = () => {
export const Topbar: React.FC = () => {
return <GradientAppBar position="static">
<Toolbar sx={{py: 1, px: 3, display: 'flex', justifyContent: 'space-between'}}>
<Typography variant="h5" fontWeight={600}>
Expand All @@ -20,6 +20,7 @@ export const Navbar: React.FC = () => {
size="large"
color="inherit"
target="_blank"
sx={{borderRadius: 5}}
>
Source code
</Button>
Expand Down

0 comments on commit 79ab955

Please sign in to comment.