mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-21 13:19:22 +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({
|
const { masto } = api({
|
||||||
instance,
|
instance,
|
||||||
});
|
});
|
||||||
const { masto: currentMasto } = api();
|
const { masto: currentMasto, instance: currentInstance } = api();
|
||||||
const [uiState, setUIState] = useState('default');
|
const [uiState, setUIState] = useState('default');
|
||||||
const isString = typeof account === 'string';
|
const isString = typeof account === 'string';
|
||||||
const [info, setInfo] = useState(isString ? null : account);
|
const [info, setInfo] = useState(isString ? null : account);
|
||||||
|
@ -137,8 +137,8 @@ function AccountInfo({
|
||||||
);
|
);
|
||||||
|
|
||||||
const sameCurrentInstance = useMemo(
|
const sameCurrentInstance = useMemo(
|
||||||
() => instance === api().instance,
|
() => instance === currentInstance,
|
||||||
[instance],
|
[instance, currentInstance],
|
||||||
);
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
@ -534,7 +534,7 @@ function AccountInfo({
|
||||||
class="note"
|
class="note"
|
||||||
dir="auto"
|
dir="auto"
|
||||||
onClick={handleContentLinks({
|
onClick={handleContentLinks({
|
||||||
instance,
|
instance: currentInstance,
|
||||||
})}
|
})}
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: enhanceContent(note, { emojis }),
|
__html: enhanceContent(note, { emojis }),
|
||||||
|
|
Loading…
Reference in a new issue