Skip to content

Commit

Permalink
Refactor page and sales policy components
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsukiKigoshi committed Mar 21, 2024
1 parent 1ca7701 commit 42b686b
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 53 deletions.
27 changes: 11 additions & 16 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
"use client";
import Footer from "@/components/Footer";
import Main from "@/components/Main";
import { Box, ThemeProvider, createTheme } from "@mui/material";
import { Box } from "@mui/material";

export default function App() {
const theme = createTheme({
palette: {},
});
return (
<ThemeProvider theme={theme}>
<Box
sx={{
display: "grid",
placeItems: "center", // Center the content horizontally and vertically
minHeight: "100vh", // Set a minimum height to fill the entire viewport
}}
>
<Main />
<Footer />
</Box>
</ThemeProvider>
<Box
sx={{
display: "grid",
placeItems: "center", // Center the content horizontally and vertically
minHeight: "100vh", // Set a minimum height to fill the entire viewport
}}
>
<Main />
<Footer />
</Box>
);
}
60 changes: 23 additions & 37 deletions src/components/SalesPolicy.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
import CottageIcon from "@mui/icons-material/Cottage";
import {
Box,
Button,
ThemeProvider,
Typography,
createTheme,
} from "@mui/material";
import { orange } from "@mui/material/colors";
import { Box, Button, Typography } from "@mui/material";

export default function SalesPolicy() {
function createData(title: string, content: string) {
Expand All @@ -28,41 +21,34 @@ export default function SalesPolicy() {
),
];

const theme = createTheme({
palette: {
primary: orange,
},
});
return (
<ThemeProvider theme={theme}>
<Box
sx={{
display: "grid",
placeItems: "center", // Center the content horizontally and vertically
minHeight: "100vh", // Set a minimum height to fill the entire viewport
m: 2,
p: 2,
}}
>
<Typography sx={{ fontSize: 24 }}>特定商取引法に基づく表記</Typography>
<Box
sx={{
display: "grid",
placeItems: "center", // Center the content horizontally and vertically
minHeight: "100vh", // Set a minimum height to fill the entire viewport
m: 2,
p: 2,
placeItems: "left",
}}
>
<Typography sx={{ fontSize: 24 }}>特定商取引法に基づく表記</Typography>
<Box
sx={{
display: "grid",
placeItems: "left",
}}
>
{rows.map((row) => (
<Box key={row.title} sx={{ my: 1 }}>
<Typography sx={{ fontWeight: "bold" }}>{row.title}</Typography>
<Typography>{row.content}</Typography>
</Box>
))}
</Box>

<Button href="/" variant="contained" startIcon={<CottageIcon />}>
Go Home
</Button>
{rows.map((row) => (
<Box key={row.title} sx={{ my: 1 }}>
<Typography sx={{ fontWeight: "bold" }}>{row.title}</Typography>
<Typography>{row.content}</Typography>
</Box>
))}
</Box>
</ThemeProvider>

<Button href="/" variant="contained" startIcon={<CottageIcon />}>
Go Home
</Button>
</Box>
);
}

0 comments on commit 42b686b

Please sign in to comment.