mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-09 10:15:26 +00:00
Merge pull request #21 from archem-team/bug/invite_url_default
Changed to back
This commit is contained in:
@@ -7,10 +7,10 @@ import { ModalForm } from "@revoltchat/ui";
|
||||
|
||||
import { noopAsync } from "../../../lib/js";
|
||||
|
||||
import { IS_REVOLT } from "../../../version";
|
||||
import { takeError } from "../../client/jsx/error";
|
||||
import { modalController } from "../ModalController";
|
||||
import { ModalProps } from "../types";
|
||||
import { IS_REVOLT } from "../../../version";
|
||||
|
||||
/**
|
||||
* Code block which displays invite
|
||||
@@ -44,9 +44,7 @@ export default function CreateInvite({
|
||||
|
||||
target
|
||||
.createInvite()
|
||||
.then((res) => {
|
||||
setCode(res._id || "default_code");
|
||||
})
|
||||
.then(({ _id }) => setCode(_id))
|
||||
.catch((err) =>
|
||||
modalController.push({ type: "error", error: takeError(err) }),
|
||||
)
|
||||
@@ -81,10 +79,11 @@ export default function CreateInvite({
|
||||
children: <Text id="app.context_menu.copy_link" />,
|
||||
onClick: () =>
|
||||
modalController.writeText(
|
||||
`https://${window.location.host}/invite/${code}`,
|
||||
`https://${window.location.host}/invite/${code}`
|
||||
),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user