mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Added in the right character count for bio when bio is present
refs https://github.com/TryGhost/Team/issues/1716
This commit is contained in:
parent
5128360df4
commit
4cc2ed88c3
1 changed files with 5 additions and 1 deletions
|
@ -12,7 +12,11 @@ const AddNameDialog = (props) => {
|
|||
const [bio, setBio] = useState(member.bio ?? '');
|
||||
|
||||
const maxBioChars = 50;
|
||||
const [bioCharsLeft, setBioCharsLeft] = useState(maxBioChars);
|
||||
let initialBioChars = maxBioChars;
|
||||
if (member.bio) {
|
||||
initialBioChars -= member.bio.length;
|
||||
}
|
||||
const [bioCharsLeft, setBioCharsLeft] = useState(initialBioChars);
|
||||
|
||||
const [error, setError] = useState({name: '', bio: ''});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue