mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-02 06:06:41 +01:00
Use current instance for links on account info
This commit is contained in:
parent
b40bbb32c2
commit
77312f3fb2
1 changed files with 4 additions and 4 deletions
|
@ -126,7 +126,7 @@ function AccountInfo({
|
|||
const { masto } = api({
|
||||
instance,
|
||||
});
|
||||
const { masto: currentMasto } = api();
|
||||
const { masto: currentMasto, instance: currentInstance } = api();
|
||||
const [uiState, setUIState] = useState('default');
|
||||
const isString = typeof account === 'string';
|
||||
const [info, setInfo] = useState(isString ? null : account);
|
||||
|
@ -137,8 +137,8 @@ function AccountInfo({
|
|||
);
|
||||
|
||||
const sameCurrentInstance = useMemo(
|
||||
() => instance === api().instance,
|
||||
[instance],
|
||||
() => instance === currentInstance,
|
||||
[instance, currentInstance],
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
|
@ -534,7 +534,7 @@ function AccountInfo({
|
|||
class="note"
|
||||
dir="auto"
|
||||
onClick={handleContentLinks({
|
||||
instance,
|
||||
instance: currentInstance,
|
||||
})}
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: enhanceContent(note, { emojis }),
|
||||
|
|
Loading…
Reference in a new issue