Skip to content

Commit 013ce46

Browse files
committed
feat: add a check for hostname to display message
1 parent 41b86c7 commit 013ce46

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

client/src/App.jsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,15 @@ function App() {
241241
}
242242
}, [showTextEditor, socket, hasCollaborationStarted]);
243243

244+
// Hook to display a message when someone opens the app through vercel's url
245+
useEffect(() => {
246+
const isVercel = window.location.hostname === "https://drawrtcbyajeet.vercel.app/"
247+
if (isVercel) {
248+
setMessageText("Collaborative features require local installation. For more information, please visit our GitHub repository (linked in the menu).");
249+
setShowMenu(true);
250+
}
251+
}, []);
252+
244253
return (
245254
<div id="container">
246255
<Sidebar

0 commit comments

Comments
 (0)