Skip to content

Commit c58f895

Browse files
pre-commit-ci[bot]batpad
authored andcommitted
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent d520981 commit c58f895

File tree

2 files changed

+18
-19
lines changed

2 files changed

+18
-19
lines changed

jupyterhub_config.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,7 @@
140140
"profile_options": {
141141
"image": {
142142
"display_name": "Image",
143-
"dynamic_image_building": {
144-
"enabled": True
145-
},
143+
"dynamic_image_building": {"enabled": True},
146144
"unlisted_choice": {
147145
"enabled": True,
148146
"display_name": "Custom image",
@@ -234,9 +232,7 @@
234232
"image": {
235233
"choices": {},
236234
"display_name": "Image",
237-
"dynamic_image_building": {
238-
"enabled": True
239-
},
235+
"dynamic_image_building": {"enabled": True},
240236
"unlisted_choice": {
241237
"display_name": "Custom image",
242238
"enabled": True,

src/ProfileOptions.jsx

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,28 @@ import { ImageBuilder } from "./ImageBuilder";
33

44
function hasDynamicImageBuilding(key, option) {
55
console.log("dynamic image building", key, option);
6-
return key === 'image' && option.dynamic_image_building?.enabled && option.unlisted_choice?.enabled;
6+
return (
7+
key === "image" &&
8+
option.dynamic_image_building?.enabled &&
9+
option.unlisted_choice?.enabled
10+
);
711
}
812

913
export function ProfileOptions({ config, profile }) {
1014
return (
1115
<div className="form-grid">
1216
{Object.entries(config).map(([key, option]) => {
13-
const customOptions =
14-
hasDynamicImageBuilding(key, option)
15-
? [
16-
{
17-
value: "--extra-selectable-item",
18-
label: "Build your own image",
19-
description:
20-
"Use a mybinder.org compatible GitHub repo to build your own image",
21-
component: ImageBuilder,
22-
},
23-
]
24-
: [];
17+
const customOptions = hasDynamicImageBuilding(key, option)
18+
? [
19+
{
20+
value: "--extra-selectable-item",
21+
label: "Build your own image",
22+
description:
23+
"Use a mybinder.org compatible GitHub repo to build your own image",
24+
component: ImageBuilder,
25+
},
26+
]
27+
: [];
2528

2629
return (
2730
<ResourceSelect

0 commit comments

Comments
 (0)