1
0
mirror of https://github.com/mattermost/focalboard.git synced 2024-11-27 08:31:20 +02:00

Cleanup share board and register link UI

This commit is contained in:
Chen-I Lim 2021-01-14 09:15:31 -08:00
parent 4d199ba8af
commit ef390d9653
2 changed files with 6 additions and 8 deletions

View File

@ -19,11 +19,11 @@ type Props = {
type State = {
workspace?: IWorkspace
wasCopied?: boolean
wasCopied: boolean
}
class RegistrationLinkComponent extends React.PureComponent<Props, State> {
state: State = {}
state: State = {wasCopied: false}
componentDidMount() {
this.loadData()
@ -31,7 +31,7 @@ class RegistrationLinkComponent extends React.PureComponent<Props, State> {
private async loadData() {
const workspace = await client.getWorkspace()
this.setState({workspace})
this.setState({workspace, wasCopied: false})
}
render(): JSX.Element {
@ -49,7 +49,6 @@ class RegistrationLinkComponent extends React.PureComponent<Props, State> {
{workspace && <>
<div className='row'>
<input
key={registrationUrl}
className='shareUrl'
readOnly={true}
value={registrationUrl}

View File

@ -24,11 +24,11 @@ type Props = {
type State = {
sharing?: ISharing
wasCopied?: boolean
wasCopied: boolean
}
class ShareBoardComponent extends React.PureComponent<Props, State> {
state: State = {}
state: State = {wasCopied: false}
componentDidMount() {
this.loadData()
@ -36,7 +36,7 @@ class ShareBoardComponent extends React.PureComponent<Props, State> {
private async loadData() {
const sharing = await client.getSharing(this.props.boardId)
this.setState({sharing})
this.setState({sharing, wasCopied: false})
}
render(): JSX.Element {
@ -70,7 +70,6 @@ class ShareBoardComponent extends React.PureComponent<Props, State> {
{isSharing && <>
<div className='row'>
<input
key={shareUrl.toString()}
className='shareUrl'
readOnly={true}
value={shareUrl.toString()}