Skip to content

Commit 0d70ddf

Browse files
refactor: update WorkspaceInstruction to use function-based react
1 parent ab9ae05 commit 0d70ddf

File tree

1 file changed

+29
-31
lines changed

1 file changed

+29
-31
lines changed
Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as React from "react";
1+
import React from "react";
22
import { Typography, Box } from "@mui/material";
33
import { styled } from "@mui/material/styles";
44
import WorkspaceSelector from "./WorkspaceSelector";
@@ -9,43 +9,41 @@ const MiddlePadding = styled(Box)(() => ({
99
height: "6vh",
1010
}));
1111

12-
class WorkspaceInstruction extends React.Component {
13-
render() {
14-
return (
15-
<React.Fragment>
16-
<AppAppBar pageName={"Workspace"} />
17-
<PageLayout>
12+
const WorkspaceInstruction: React.FC = () => {
13+
return (
14+
<React.Fragment>
15+
<AppAppBar pageName={"Workspace"} />
16+
<PageLayout>
17+
<Box
18+
sx={{
19+
display: "flex",
20+
alignItems: "center",
21+
flexDirection: "column",
22+
justifyContent: "center",
23+
}}
24+
>
25+
<Box sx={{ flexGrow: 3 }} />
1826
<Box
1927
sx={{
28+
flexGrow: 3,
29+
flexShrink: 0,
2030
display: "flex",
2131
alignItems: "center",
22-
flexDirection: "column",
2332
justifyContent: "center",
33+
flexDirection: "column",
2434
}}
2535
>
26-
<Box sx={{ flexGrow: 3 }} />
27-
<Box
28-
sx={{
29-
flexGrow: 3,
30-
flexShrink: 0,
31-
display: "flex",
32-
alignItems: "center",
33-
justifyContent: "center",
34-
flexDirection: "column",
35-
}}
36-
>
37-
<Typography variant="h3" gutterBottom>
38-
Please select a Workspace
39-
</Typography>
40-
<MiddlePadding />
41-
<WorkspaceSelector name="Open or create a workspace" />
42-
</Box>
43-
<Box sx={{ flexGrow: 5 }} />
36+
<Typography variant="h3" gutterBottom>
37+
Please select a Workspace
38+
</Typography>
39+
<MiddlePadding />
40+
<WorkspaceSelector name="Open or create a workspace" />
4441
</Box>
45-
</PageLayout>
46-
</React.Fragment>
47-
);
48-
}
49-
}
42+
<Box sx={{ flexGrow: 5 }} />
43+
</Box>
44+
</PageLayout>
45+
</React.Fragment>
46+
);
47+
};
5048

5149
export default WorkspaceInstruction;

0 commit comments

Comments
 (0)