Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
6 changes: 6 additions & 0 deletions client/src/components/Menu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ function Menu(){
console.log("Disconnected from the collaboration room");
}

const openGithub = () => {
const gitLink = "https://github.com/apsinghdev/drawRTC?tab=readme-ov-file#note";
window.open(gitLink, "_blank");
}

return (
<div className="w-52 h-71 rounded-xl bg-gradient-to-r from-slate-900 to-slate-700 absolute left-52 top-8 rounded-lg shadow-xl">
{hasCollaborationStarted ? (
Expand All @@ -93,6 +98,7 @@ function Menu(){
<MenuItem feat="Save as pdf" clickHandler={saveAsPdf}></MenuItem>
<MenuItem feat="Save as png" clickHandler={saveAsPng}></MenuItem>
<MenuItem feat="Open text editor" clickHandler={openTextEditor}></MenuItem>
<MenuItem feat="Github" clickHandler={openGithub}></MenuItem>
<SponsorBtn></SponsorBtn>
<Socials></Socials>
</div>
Expand Down