Skip to content

Commit

Permalink
Changes made to avoid failing node tests
Browse files Browse the repository at this point in the history
  • Loading branch information
HectorShaw committed Jul 1, 2023
1 parent 4e15e52 commit 234a2f3
Showing 1 changed file with 3 additions and 27 deletions.
30 changes: 3 additions & 27 deletions src/pages/OpenSourceCoursePage.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { useEffect, useState } from 'react';
import { useState } from 'react';
import { BsAward } from 'react-icons/bs';
import { MdOutlineLabelImportant } from 'react-icons/md';
import {
VscDebugBreakpointFunction,
VscDebugBreakpointLog,
} from 'react-icons/vsc';

import clsxm from '@/lib/utils';

import { opensourcetweet } from '@/content/opensource';

import {
Expand All @@ -24,23 +22,10 @@ import OpenSourceHeroImg from '@/assets/courses/opensource.avif';

const OpenSourcePage = ({ content }) => {
const [tweetId, setTweetId] = useState(opensourcetweet);
// const [copied, setCopied] = useState(false);
// const copyHashtag = () => {
// navigator.clipboard.writeText('#OpenSourceWithKunal');
// setCopied(true);
// };
// useEffect(() => {
// const timeout = setTimeout(() => {
// if (copied) setCopied(false);
// }, 1000);

// return () => {
// clearTimeout(timeout);
// };
// }, [copied]);

const handleClick = () => {
const twitterUrl = 'https://twitter.com/intent/tweet?text=%23OpenSourceWithKunal';
const twitterUrl =
'https://twitter.com/intent/tweet?text=%23OpenSourceWithKunal';
window.open(twitterUrl, '_blank');
};

Expand Down Expand Up @@ -181,15 +166,6 @@ const OpenSourcePage = ({ content }) => {
onClick={handleClick}
>
#OpenSourceWithKunal
<div
className={clsxm(
'pointer-events-none absolute bottom-0 left-1/2 origin-center -translate-x-1/2 -translate-y-[50%] scale-[.85] rounded bg-content px-2 text-xs text-base-100 opacity-0 transition-all duration-300',
copied &&
'translate-y-[50%] -translate-x-1/2 scale-100 opacity-100'
)}
>
Copied Hashtag
</div>
</button>{' '}
on Twitter and share your journey regularly
</span>
Expand Down

0 comments on commit 234a2f3

Please sign in to comment.