-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(settings): add settings page and handle socket errors
Signed-off-by: ph1p <phil@capshake.com>
- Loading branch information
Showing
6 changed files
with
170 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { useState, useEffect, useRef } from 'react'; | ||
import * as React from 'react'; | ||
|
||
export default function Settings(props) { | ||
const closeSettings = () => props.setSettingsView(false); | ||
|
||
return ( | ||
<div className="settings"> | ||
<div className="fields"> | ||
<input | ||
type="input" | ||
value={props.currentUser.name} | ||
className="input" | ||
placeholder="Username ..." | ||
/> | ||
<br /> | ||
|
||
<input | ||
type="input" | ||
value={props.currentUser.color} | ||
className="input" | ||
placeholder="Color ..." | ||
/> | ||
<br /> | ||
|
||
<input type="input" className="input" placeholder="Server-URL ..." /> | ||
</div> | ||
|
||
<div className="footer"> | ||
<button | ||
type="submit" | ||
onClick={closeSettings} | ||
className="button button--primary" | ||
> | ||
save | ||
</button> | ||
<button | ||
type="button" | ||
onClick={closeSettings} | ||
className="button button--secondary" | ||
> | ||
cancel | ||
</button> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters