Skip to content

Commit

Permalink
#8: Set a maximum width for start page
Browse files Browse the repository at this point in the history
  • Loading branch information
lehnerpat committed May 24, 2022
1 parent 69f7426 commit e3d4d67
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/common/components/TopLevelCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ interface TopLevelCardProps {
children: ReactNode;
}
export const TopLevelCard: FC<TopLevelCardProps> = ({ children }) => (
<Card raised sx={{ mx: 4, my: 2 }}>
<Card raised sx={{ my: 2 }}>
{children}
</Card>
);
5 changes: 3 additions & 2 deletions src/pages/StartPage/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { LoadSaveFile } from "../../common/components/LoadSaveFile";
import { IncludedTrackSelector } from "./IncludedTrackSelector";
import { NewFileStarter } from "./NewFileStarter";
import { Container } from "@mui/material";

export const StartPage = () => (
<>
<Container maxWidth="md">
<IncludedTrackSelector />
<LoadSaveFile />
<NewFileStarter />
</>
</Container>
);
6 changes: 4 additions & 2 deletions src/pages/ViewTrackPage.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
import { FC } from "react";
import { Panel } from "../common/components/Panel";
import { ReturnLink, ReturnLinkContainer } from "../common/components/return-links";
import { IncludedDataMap } from "../included-data";
import { Track } from "../track-models";
import { TrackLocalStorageService } from "../track-models/TrackLocalStorageService";
import { TrackPlayer } from "../track-player";
import { StartPage } from "./StartPage";
import { Alert, Container } from "@mui/material";

export const ViewTrackPage: FC<{ trackUuid: string }> = ({ trackUuid }) => {
const track = loadTrackFromStorage(trackUuid);

if (track === null)
return (
<>
<Panel style={{ color: "#FF8888" }}>Track with ID {trackUuid} not found.</Panel>
<Container maxWidth="md" sx={{ pt: 2 }}>
<Alert severity="error">Track with ID {trackUuid} not found.</Alert>
</Container>
<StartPage />
</>
);
Expand Down

0 comments on commit e3d4d67

Please sign in to comment.