mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-21 16:55:25 +03:00
Make sure status link has instance too for toast
This commit is contained in:
parent
732244b4b3
commit
4b88c6ca65
2 changed files with 9 additions and 3 deletions
|
@ -318,7 +318,7 @@ function App() {
|
|||
null
|
||||
}
|
||||
onClose={(results) => {
|
||||
const { newStatus } = results || {};
|
||||
const { newStatus, instance } = results || {};
|
||||
states.showCompose = false;
|
||||
window.__COMPOSE__ = null;
|
||||
if (newStatus) {
|
||||
|
@ -334,7 +334,11 @@ function App() {
|
|||
onClick: () => {
|
||||
toast.hideToast();
|
||||
states.prevLocation = location;
|
||||
navigate(`/s/${newStatus.id}`);
|
||||
navigate(
|
||||
instance
|
||||
? `/${instance}/s/${newStatus.id}`
|
||||
: `/s/${newStatus.id}`,
|
||||
);
|
||||
},
|
||||
});
|
||||
toast.showToast();
|
||||
|
|
|
@ -113,7 +113,8 @@ function Compose({
|
|||
const currentAccount = getCurrentAccount();
|
||||
const currentAccountInfo = currentAccount.info;
|
||||
|
||||
const { configuration } = getCurrentInstance();
|
||||
const instance = getCurrentInstance();
|
||||
const { configuration } = instance;
|
||||
console.log('⚙️ Configuration', configuration);
|
||||
|
||||
const {
|
||||
|
@ -785,6 +786,7 @@ function Compose({
|
|||
// Close
|
||||
onClose({
|
||||
newStatus,
|
||||
instance,
|
||||
});
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
|
|
Loading…
Reference in a new issue