mirror of
https://github.com/fluencelabs/fluent-pad
synced 2025-04-24 16:32:13 +00:00
disabling join button
This commit is contained in:
parent
98d3cfd990
commit
655d2fcf81
@ -1,7 +1,7 @@
|
||||
$bg-color1: white;
|
||||
$bg-color2: #f4f4f4;
|
||||
$font-color1: black;
|
||||
$font-color1-disabled: lightgray;
|
||||
$color-disabled: lightgray;
|
||||
|
||||
$color1: black;
|
||||
$color2: rgb(214, 214, 214);
|
||||
@ -185,6 +185,10 @@ body {
|
||||
color: white;
|
||||
border: none;
|
||||
}
|
||||
&:disabled {
|
||||
color: $color-disabled;
|
||||
border-color: $color-disabled;
|
||||
}
|
||||
}
|
||||
|
||||
.header-item {
|
||||
|
@ -11,7 +11,7 @@ import { relayNode } from 'src/app/constants';
|
||||
const App = () => {
|
||||
const [client, setClient] = useState<FluenceClient | null>(null);
|
||||
const [isInRoom, setIsInRoom] = useState<boolean>(false);
|
||||
const [nickName, setNickName] = useState('myNickName');
|
||||
const [nickName, setNickName] = useState('');
|
||||
|
||||
useEffect(() => {
|
||||
const fn = async () => {
|
||||
@ -80,7 +80,11 @@ const App = () => {
|
||||
}}
|
||||
/>
|
||||
|
||||
<button className="join-button" disabled={isInRoom || !client} onClick={joinRoom}>
|
||||
<button
|
||||
className="join-button"
|
||||
disabled={isInRoom || !client || !nickName}
|
||||
onClick={joinRoom}
|
||||
>
|
||||
Join
|
||||
</button>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user