mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-01-22 16:46:28 +01:00
Disable Switch post menu if no post instance yet
This commit is contained in:
parent
25e13144a3
commit
1422c5da33
1 changed files with 10 additions and 2 deletions
|
@ -1100,7 +1100,7 @@ function StatusThread({ id, closeLink = '/', instance: propInstance }) {
|
|||
<MenuDivider />
|
||||
<MenuHeader className="plain">Experimental</MenuHeader>
|
||||
<MenuItem
|
||||
disabled={postSameInstance}
|
||||
disabled={!postInstance || postSameInstance}
|
||||
onClick={() => {
|
||||
const statusURL = getInstanceStatusURL(heroStatus.url);
|
||||
if (statusURL) {
|
||||
|
@ -1112,7 +1112,15 @@ function StatusThread({ id, closeLink = '/', instance: propInstance }) {
|
|||
>
|
||||
<Icon icon="transfer" />
|
||||
<small class="menu-double-lines">
|
||||
Switch to post's instance (<b>{postInstance}</b>)
|
||||
Switch to post's instance
|
||||
{postInstance ? (
|
||||
<>
|
||||
{' '}
|
||||
(<b>{postInstance}</b>)
|
||||
</>
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
</small>
|
||||
</MenuItem>
|
||||
</Menu2>
|
||||
|
|
Loading…
Reference in a new issue