Skip to content

Commit afd4633

Browse files
committed
chore: prettifying
1 parent bfe5e8f commit afd4633

File tree

3 files changed

+44
-42
lines changed

3 files changed

+44
-42
lines changed

src/components/forms/siteurl.js

Lines changed: 42 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -16,53 +16,55 @@ export default class SiteURLForm extends Component {
1616
};
1717

1818
clearSiteURL = e => {
19-
e.preventDefault
20-
this.props.onSiteURL()
21-
}
19+
e.preventDefault;
20+
this.props.onSiteURL();
21+
};
2222

2323
render() {
2424
const { url, development } = this.state;
2525

2626
return (
2727
<div>
28-
{ development ? (
29-
<div class="subheader">
30-
<h3>Development Settings</h3>
31-
<button
32-
onclick={ (e) => this.clearSiteURL(e) }
33-
className="btnLink forgotPasswordLink"
34-
>
35-
Clear localhost URL
36-
</button>
37-
</div>
38-
) : (
39-
<form onsubmit={this.addSiteURL} className="form">
40-
<div className="flashMessage">
41-
{
42-
"Looks like you're running a local server. Please let us know the URL of your Netlify site."
43-
}
44-
</div>
45-
<div className="formGroup">
46-
<label>
47-
<span className="visuallyHidden">Enter your Netlify Site URL</span>
48-
<input
49-
className="formControl"
50-
type="url"
51-
name="url"
52-
value={url}
53-
placeholder="URL of your Netlify site"
54-
autocapitalize="off"
55-
required
56-
oninput={this.handleInput}
57-
/>
58-
<div className="inputFieldIcon inputFieldUrl" />
59-
</label>
28+
{development ? (
29+
<div class="subheader">
30+
<h3>Development Settings</h3>
31+
<button
32+
onclick={e => this.clearSiteURL(e)}
33+
className="btnLink forgotPasswordLink"
34+
>
35+
Clear localhost URL
36+
</button>
6037
</div>
61-
<button type="submit" className="btn">
62-
Set site's URL
63-
</button>
64-
</form>
65-
)}
38+
) : (
39+
<form onsubmit={this.addSiteURL} className="form">
40+
<div className="flashMessage">
41+
{
42+
"Looks like you're running a local server. Please let us know the URL of your Netlify site."
43+
}
44+
</div>
45+
<div className="formGroup">
46+
<label>
47+
<span className="visuallyHidden">
48+
Enter your Netlify Site URL
49+
</span>
50+
<input
51+
className="formControl"
52+
type="url"
53+
name="url"
54+
value={url}
55+
placeholder="URL of your Netlify site"
56+
autocapitalize="off"
57+
required
58+
oninput={this.handleInput}
59+
/>
60+
<div className="inputFieldIcon inputFieldUrl" />
61+
</label>
62+
</div>
63+
<button type="submit" className="btn">
64+
Set site's URL
65+
</button>
66+
</form>
67+
)}
6668
</div>
6769
);
6870
}

src/netlify-identity.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ observe(store.modal, "isOpen", () => {
125125

126126
observe(store, "siteURL", () => {
127127
if (store.siteURL === null || store.siteURL === undefined) {
128-
localStorage.removeItem("netlifySiteURL")
128+
localStorage.removeItem("netlifySiteURL");
129129
} else {
130130
localStorage.setItem("netlifySiteURL", store.siteURL);
131131
}

src/state/store.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ store.clearSiteURL = action(function clearSiteURL() {
7171
store.gotrue = null;
7272
store.siteURL = null;
7373
store.settings = null;
74-
})
74+
});
7575

7676
store.login = action(function login(email, password) {
7777
store.startAction();

0 commit comments

Comments
 (0)