Skip to content

Commit 8f55513

Browse files
committed
Add to a page, lint
1 parent 00224b8 commit 8f55513

File tree

7 files changed

+16
-20
lines changed

7 files changed

+16
-20
lines changed

site/src/components/Header/Header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const useStyles = makeStyles((theme) => ({
7979
flex: 1,
8080
height: 68,
8181
minWidth: 0,
82-
padding: `0 ${sidePadding}`
82+
padding: `0 ${sidePadding}`,
8383
},
8484
title: {
8585
display: "flex",

site/src/components/Margins/Margins.stories.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { action } from "@storybook/addon-actions"
21
import { ComponentMeta, Story } from "@storybook/react"
32
import React from "react"
43
import { Margins } from "./Margins"
@@ -10,9 +9,7 @@ export default {
109

1110
const Template: Story = (args) => (
1211
<Margins {...args}>
13-
<div style={{ width: "100%", background: "lightgrey" }}>
14-
Here's some content that won't get too wide!
15-
</div>
12+
<div style={{ width: "100%", background: "lightgrey" }}>Here is some content that will not get too wide!</div>
1613
</Margins>
1714
)
1815

site/src/components/Margins/Margins.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,14 @@ const useStyles = makeStyles(() => ({
88
maxWidth,
99
padding: `0 ${sidePadding}`,
1010
flex: 1,
11-
}
11+
},
1212
}))
1313

1414
export const Margins: React.FC = ({ children }) => {
1515
const styles = useStyles()
1616
return (
1717
<div>
18-
<div className={styles.margins}>
19-
{children}
20-
</div>
18+
<div className={styles.margins}>{children}</div>
2119
</div>
2220
)
2321
}

site/src/components/PreferencesLayout/PreferencesLayout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const PreferencesLayout: React.FC = () => {
2828
<TabPanel title={Language.preferencesLabel} menuItems={menuItems}>
2929
<Outlet />
3030
</TabPanel>
31-
</Margins>
31+
</Margins>
3232
</Box>
3333
</AuthAndFrame>
3434
)

site/src/pages/TemplatesPages/TemplatesPage.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import Paper from "@material-ui/core/Paper"
21
import { makeStyles } from "@material-ui/core/styles"
32
import React from "react"
43
import { Link } from "react-router-dom"

site/src/pages/UsersPage/CreateUserPage/CreateUserPage.tsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import React, { useContext } from "react"
33
import { useNavigate } from "react-router"
44
import { CreateUserRequest } from "../../../api/types"
55
import { CreateUserForm } from "../../../components/CreateUserForm/CreateUserForm"
6+
import { Margins } from "../../../components/Margins/Margins"
67
import { selectOrgId } from "../../../xServices/auth/authSelectors"
78
import { XServiceContext } from "../../../xServices/StateContext"
89

@@ -21,13 +22,15 @@ export const CreateUserPage: React.FC = () => {
2122
createUserError || createUserFormErrors?.organization_id || !myOrgId ? Language.unknownError : undefined
2223

2324
return (
24-
<CreateUserForm
25-
formErrors={createUserFormErrors}
26-
onSubmit={(user: CreateUserRequest) => usersSend({ type: "CREATE", user })}
27-
onCancel={() => navigate("/users")}
28-
isLoading={usersState.hasTag("loading")}
29-
error={genericError}
30-
myOrgId={myOrgId ?? ""}
31-
/>
25+
<Margins>
26+
<CreateUserForm
27+
formErrors={createUserFormErrors}
28+
onSubmit={(user: CreateUserRequest) => usersSend({ type: "CREATE", user })}
29+
onCancel={() => navigate("/users")}
30+
isLoading={usersState.hasTag("loading")}
31+
error={genericError}
32+
myOrgId={myOrgId ?? ""}
33+
/>
34+
</Margins>
3235
)
3336
}

site/src/pages/UsersPage/UsersPageView.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { makeStyles } from "@material-ui/core/styles"
21
import React from "react"
32
import { Pager, UserResponse } from "../../api/types"
43
import { Header } from "../../components/Header/Header"

0 commit comments

Comments
 (0)