Skip to content

Commit

Permalink
feat: add a check for hostname to display message
Browse files Browse the repository at this point in the history
  • Loading branch information
apsinghdev committed Sep 4, 2024
1 parent 41b86c7 commit 013ce46
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions client/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,15 @@ function App() {
}
}, [showTextEditor, socket, hasCollaborationStarted]);

// Hook to display a message when someone opens the app through vercel's url
useEffect(() => {
const isVercel = window.location.hostname === "https://drawrtcbyajeet.vercel.app/"
if (isVercel) {
setMessageText("Collaborative features require local installation. For more information, please visit our GitHub repository (linked in the menu).");
setShowMenu(true);
}
}, []);

return (
<div id="container">
<Sidebar
Expand Down

0 comments on commit 013ce46

Please sign in to comment.