feat: 新增邀请中间页,分享链接带上下文引导新用户加入
This commit is contained in:
@@ -20,7 +20,7 @@ export default function TopNav({ roomId, userCount }: TopNavProps) {
|
||||
}, []);
|
||||
|
||||
const handleInvite = useCallback(async () => {
|
||||
const url = window.location.href;
|
||||
const url = `${window.location.origin}/invite/${roomId}`;
|
||||
const shareData = {
|
||||
title: "别说随便啦,来滑卡片决定吃什么!",
|
||||
text: "我建好房间了,快点开链接一起选餐厅,滑中同一家就去吃!",
|
||||
@@ -42,7 +42,7 @@ export default function TopNav({ roomId, userCount }: TopNavProps) {
|
||||
} catch {
|
||||
showToast("复制失败,请手动复制链接");
|
||||
}
|
||||
}, [showToast]);
|
||||
}, [roomId, showToast]);
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user