From b8c200e7ac33b201a552ca128f6de0938b316313 Mon Sep 17 00:00:00 2001 From: SRINJAYDASGUPTA-Git Date: Thu, 28 Dec 2023 19:48:36 +0530 Subject: [PATCH] Fix: made images not selectable and undraggable --- apps/web/app/components/Killers.tsx | 2 ++ apps/web/app/components/Links.tsx | 2 ++ apps/web/app/global.css | 9 +++++++++ apps/web/app/page.tsx | 6 +++--- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/apps/web/app/components/Killers.tsx b/apps/web/app/components/Killers.tsx index 995ac69e..0ec4556b 100644 --- a/apps/web/app/components/Killers.tsx +++ b/apps/web/app/components/Killers.tsx @@ -15,6 +15,8 @@ const Killers = ({ image, twitterUserName }: KillersProps) => { height={36} width={37} alt={`${image}`} + className='unselectable' + draggable='false' />
diff --git a/apps/web/app/components/Links.tsx b/apps/web/app/components/Links.tsx index c3acbfad..7d1318b4 100644 --- a/apps/web/app/components/Links.tsx +++ b/apps/web/app/components/Links.tsx @@ -22,6 +22,8 @@ const Links = ({ icon, description, link }: LinksProps) => { alt={`${icon}`} height={12} width={13} + className='unselectable' + draggable='false' />

{description}

diff --git a/apps/web/app/global.css b/apps/web/app/global.css index 501b0b12..1b8feb48 100644 --- a/apps/web/app/global.css +++ b/apps/web/app/global.css @@ -6,3 +6,12 @@ margin: 0; padding: 0; } + +.unselectable { + user-drag: none; + user-select: none; + -moz-user-select: none; + -webkit-user-drag: none; + -webkit-user-select: none; + -ms-user-select: none; +} \ No newline at end of file diff --git a/apps/web/app/page.tsx b/apps/web/app/page.tsx index 8fe0cd2c..ef118f0e 100644 --- a/apps/web/app/page.tsx +++ b/apps/web/app/page.tsx @@ -15,15 +15,15 @@ export default async function Index() {
- grid + grid
- stars + stars
- logo + logo