Skip to content

Commit d4962dc

Browse files
committed
added easter egg, added event handlers, and refactored code. (generated by useblackbox.ai )
1 parent 23dfa6a commit d4962dc

15 files changed

+958
-18
lines changed

.history/src/components/dashboard/WelcomeBanner_20230515202254.jsx renamed to .history/src/components/dashboard/WelcomeBanner_20231015175902.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function WelcomeBanner() {
5151

5252
{/* Content */}
5353
<div className="relative">
54-
<h1 id="greeting" className="text-2xl md:text-3xl text-slate-800 font-bold mb-1">{`Welcome, ${name}. 👋`}</h1>
54+
<h1 id="greeting" className="text-2xl md:text-3xl text-slate-800 font-bold mb-1">{`Welcome, ${name}.`} <span>👋</span></h1>
5555
<p className='text-gray-600'>Here is what’s happening with your projects today:</p>
5656
</div>
5757

.history/src/components/dashboard/WelcomeBanner_20230402221517.jsx renamed to .history/src/components/dashboard/WelcomeBanner_20231015180818.jsx

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
1-
import React from 'react';
1+
import React, {useState} from 'react';
22

33

4-
function WelcomeBanner() {
4+
function WelcomeBanner() {
55
const name = localStorage.getItem('name')
66

7+
const [Click, setClick] = useState(0)
8+
9+
const EasterEggClick = () => {
10+
setClick(Click+1)
11+
if (Click = 3) {
12+
alert("You've found the easter egg!")
13+
window.replace('https://www.youtube.com/watch?v=PXqcHi2fkXI')
14+
}
15+
}
16+
717
return (
818
<div className="relative bg-indigo-200 p-4 sm:p-6 rounded-sm overflow-hidden mb-8">
919

@@ -51,8 +61,8 @@ function WelcomeBanner() {
5161

5262
{/* Content */}
5363
<div className="relative">
54-
<h1 id="greeting" className="text-2xl md:text-3xl text-slate-800 font-bold mb-1">{`Welcome, ${name}. 👋`}</h1>
55-
<p>Here is what’s happening with your projects today:</p>
64+
<h1 id="greeting" className="text-2xl md:text-3xl text-slate-800 font-bold mb-1">{`Welcome, ${name}.`} <span onClick={EasterEggClick}>👋</span></h1>
65+
<p className='text-gray-600'>Here is what’s happening with your projects today:</p>
5666
</div>
5767

5868
</div>
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
import React, {useState} from 'react';
2+
3+
4+
function WelcomeBanner() {
5+
const name = localStorage.getItem('name')
6+
7+
const [Click, setClick] = useState(0)
8+
9+
const EasterEggClick = () => {
10+
setClick(Click+1)
11+
console.log(Click)
12+
if (Click = 3) {
13+
alert("You've found the easter egg!")
14+
window.replace('https://www.youtube.com/watch?v=PXqcHi2fkXI')
15+
}
16+
}
17+
18+
return (
19+
<div className="relative bg-indigo-200 p-4 sm:p-6 rounded-sm overflow-hidden mb-8">
20+
21+
{/* Background illustration */}
22+
<div className="absolute right-0 top-0 -mt-4 mr-16 pointer-events-none hidden xl:block" aria-hidden="true">
23+
<svg width="319" height="198" xmlnsXlink="http://www.w3.org/1999/xlink">
24+
<defs>
25+
<path id="welcome-a" d="M64 0l64 128-64-20-64 20z" />
26+
<path id="welcome-e" d="M40 0l40 80-40-12.5L0 80z" />
27+
<path id="welcome-g" d="M40 0l40 80-40-12.5L0 80z" />
28+
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="welcome-b">
29+
<stop stopColor="#A5B4FC" offset="0%" />
30+
<stop stopColor="#818CF8" offset="100%" />
31+
</linearGradient>
32+
<linearGradient x1="50%" y1="24.537%" x2="50%" y2="100%" id="welcome-c">
33+
<stop stopColor="#4338CA" offset="0%" />
34+
<stop stopColor="#6366F1" stopOpacity="0" offset="100%" />
35+
</linearGradient>
36+
</defs>
37+
<g fill="none" fillRule="evenodd">
38+
<g transform="rotate(64 36.592 105.604)">
39+
<mask id="welcome-d" fill="#fff">
40+
<use xlinkHref="#welcome-a" />
41+
</mask>
42+
<use fill="url(#welcome-b)" xlinkHref="#welcome-a" />
43+
<path fill="url(#welcome-c)" mask="url(#welcome-d)" d="M64-24h80v152H64z" />
44+
</g>
45+
<g transform="rotate(-51 91.324 -105.372)">
46+
<mask id="welcome-f" fill="#fff">
47+
<use xlinkHref="#welcome-e" />
48+
</mask>
49+
<use fill="url(#welcome-b)" xlinkHref="#welcome-e" />
50+
<path fill="url(#welcome-c)" mask="url(#welcome-f)" d="M40.333-15.147h50v95h-50z" />
51+
</g>
52+
<g transform="rotate(44 61.546 392.623)">
53+
<mask id="welcome-h" fill="#fff">
54+
<use xlinkHref="#welcome-g" />
55+
</mask>
56+
<use fill="url(#welcome-b)" xlinkHref="#welcome-g" />
57+
<path fill="url(#welcome-c)" mask="url(#welcome-h)" d="M40.333-15.147h50v95h-50z" />
58+
</g>
59+
</g>
60+
</svg>
61+
</div>
62+
63+
{/* Content */}
64+
<div className="relative">
65+
<h1 id="greeting" className="text-2xl md:text-3xl text-slate-800 font-bold mb-1">{`Welcome, ${name}.`} <span onClick={EasterEggClick}>👋</span></h1>
66+
<p className='text-gray-600'>Here is what’s happening with your projects today:</p>
67+
</div>
68+
69+
</div>
70+
);
71+
72+
}
73+
74+
75+
export default WelcomeBanner;
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
import React, {useState} from 'react';
2+
3+
4+
function WelcomeBanner() {
5+
const name = localStorage.getItem('name')
6+
7+
const [Click, setClick] = useState(0)
8+
9+
const EasterEggClick = () => {
10+
setClick(Click+1)
11+
console.log(Click)
12+
if (Click === 3) {
13+
alert("You've found the easter egg!")
14+
window.replace('https://www.youtube.com/watch?v=PXqcHi2fkXI')
15+
}
16+
}
17+
18+
return (
19+
<div className="relative bg-indigo-200 p-4 sm:p-6 rounded-sm overflow-hidden mb-8">
20+
21+
{/* Background illustration */}
22+
<div className="absolute right-0 top-0 -mt-4 mr-16 pointer-events-none hidden xl:block" aria-hidden="true">
23+
<svg width="319" height="198" xmlnsXlink="http://www.w3.org/1999/xlink">
24+
<defs>
25+
<path id="welcome-a" d="M64 0l64 128-64-20-64 20z" />
26+
<path id="welcome-e" d="M40 0l40 80-40-12.5L0 80z" />
27+
<path id="welcome-g" d="M40 0l40 80-40-12.5L0 80z" />
28+
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="welcome-b">
29+
<stop stopColor="#A5B4FC" offset="0%" />
30+
<stop stopColor="#818CF8" offset="100%" />
31+
</linearGradient>
32+
<linearGradient x1="50%" y1="24.537%" x2="50%" y2="100%" id="welcome-c">
33+
<stop stopColor="#4338CA" offset="0%" />
34+
<stop stopColor="#6366F1" stopOpacity="0" offset="100%" />
35+
</linearGradient>
36+
</defs>
37+
<g fill="none" fillRule="evenodd">
38+
<g transform="rotate(64 36.592 105.604)">
39+
<mask id="welcome-d" fill="#fff">
40+
<use xlinkHref="#welcome-a" />
41+
</mask>
42+
<use fill="url(#welcome-b)" xlinkHref="#welcome-a" />
43+
<path fill="url(#welcome-c)" mask="url(#welcome-d)" d="M64-24h80v152H64z" />
44+
</g>
45+
<g transform="rotate(-51 91.324 -105.372)">
46+
<mask id="welcome-f" fill="#fff">
47+
<use xlinkHref="#welcome-e" />
48+
</mask>
49+
<use fill="url(#welcome-b)" xlinkHref="#welcome-e" />
50+
<path fill="url(#welcome-c)" mask="url(#welcome-f)" d="M40.333-15.147h50v95h-50z" />
51+
</g>
52+
<g transform="rotate(44 61.546 392.623)">
53+
<mask id="welcome-h" fill="#fff">
54+
<use xlinkHref="#welcome-g" />
55+
</mask>
56+
<use fill="url(#welcome-b)" xlinkHref="#welcome-g" />
57+
<path fill="url(#welcome-c)" mask="url(#welcome-h)" d="M40.333-15.147h50v95h-50z" />
58+
</g>
59+
</g>
60+
</svg>
61+
</div>
62+
63+
{/* Content */}
64+
<div className="relative">
65+
<h1 id="greeting" className="text-2xl md:text-3xl text-slate-800 font-bold mb-1">{`Welcome, ${name}.`} <span onClick={EasterEggClick}>👋</span></h1>
66+
<p className='text-gray-600'>Here is what’s happening with your projects today:</p>
67+
</div>
68+
69+
</div>
70+
);
71+
72+
}
73+
74+
75+
export default WelcomeBanner;

.history/src/components/dashboard/WelcomeBanner_20230515194705.jsx renamed to .history/src/components/dashboard/WelcomeBanner_20231015181534.jsx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
1-
import React from 'react';
1+
import React, {useState} from 'react';
22

33

44
function WelcomeBanner() {
55
const name = localStorage.getItem('name')
66

7+
const [Click, setClick] = useState(0)
8+
9+
const EasterEggClick = () => {
10+
setClick(Click+1)
11+
console.log(Click)
12+
if (Click === 3) {
13+
window.location.replace('https://www.youtube.com/watch?v=PXqcHi2fkXI')
14+
}
15+
}
16+
717
return (
818
<div className="relative bg-indigo-200 p-4 sm:p-6 rounded-sm overflow-hidden mb-8">
919

@@ -51,8 +61,8 @@ function WelcomeBanner() {
5161

5262
{/* Content */}
5363
<div className="relative">
54-
<h1 id="greeting" className="text-2xl md:text-3xl text-slate-800 font-bold mb-1">{`Welcome, ${name}. 👋`}</h1>
55-
<p className='text-grap-600'>Here is what’s happening with your projects today:</p>
64+
<h1 id="greeting" className="text-2xl md:text-3xl text-slate-800 font-bold mb-1">{`Welcome, ${name}.`} <span onClick={EasterEggClick}>👋</span></h1>
65+
<p className='text-gray-600'>Here is what’s happening with your projects today:</p>
5666
</div>
5767

5868
</div>
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
import React, {useState} from 'react';
2+
3+
4+
function WelcomeBanner() {
5+
const name = localStorage.getItem('name')
6+
7+
const [Click, setClick] = useState(0);
8+
9+
const EasterEggClick = () => {
10+
const newClick = Click + 1;
11+
setClick(newClick);
12+
console.log(newClick);
13+
if (newClick === 3) {
14+
alert("You've found the easter egg!");
15+
window.location.replace('https://www.youtube.com/watch?v=PXqcHi2fkXI');
16+
}
17+
}
18+
19+
return (
20+
<div className="relative bg-indigo-200 p-4 sm:p-6 rounded-sm overflow-hidden mb-8">
21+
22+
{/* Background illustration */}
23+
<div className="absolute right-0 top-0 -mt-4 mr-16 pointer-events-none hidden xl:block" aria-hidden="true">
24+
<svg width="319" height="198" xmlnsXlink="http://www.w3.org/1999/xlink">
25+
<defs>
26+
<path id="welcome-a" d="M64 0l64 128-64-20-64 20z" />
27+
<path id="welcome-e" d="M40 0l40 80-40-12.5L0 80z" />
28+
<path id="welcome-g" d="M40 0l40 80-40-12.5L0 80z" />
29+
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="welcome-b">
30+
<stop stopColor="#A5B4FC" offset="0%" />
31+
<stop stopColor="#818CF8" offset="100%" />
32+
</linearGradient>
33+
<linearGradient x1="50%" y1="24.537%" x2="50%" y2="100%" id="welcome-c">
34+
<stop stopColor="#4338CA" offset="0%" />
35+
<stop stopColor="#6366F1" stopOpacity="0" offset="100%" />
36+
</linearGradient>
37+
</defs>
38+
<g fill="none" fillRule="evenodd">
39+
<g transform="rotate(64 36.592 105.604)">
40+
<mask id="welcome-d" fill="#fff">
41+
<use xlinkHref="#welcome-a" />
42+
</mask>
43+
<use fill="url(#welcome-b)" xlinkHref="#welcome-a" />
44+
<path fill="url(#welcome-c)" mask="url(#welcome-d)" d="M64-24h80v152H64z" />
45+
</g>
46+
<g transform="rotate(-51 91.324 -105.372)">
47+
<mask id="welcome-f" fill="#fff">
48+
<use xlinkHref="#welcome-e" />
49+
</mask>
50+
<use fill="url(#welcome-b)" xlinkHref="#welcome-e" />
51+
<path fill="url(#welcome-c)" mask="url(#welcome-f)" d="M40.333-15.147h50v95h-50z" />
52+
</g>
53+
<g transform="rotate(44 61.546 392.623)">
54+
<mask id="welcome-h" fill="#fff">
55+
<use xlinkHref="#welcome-g" />
56+
</mask>
57+
<use fill="url(#welcome-b)" xlinkHref="#welcome-g" />
58+
<path fill="url(#welcome-c)" mask="url(#welcome-h)" d="M40.333-15.147h50v95h-50z" />
59+
</g>
60+
</g>
61+
</svg>
62+
</div>
63+
64+
{/* Content */}
65+
<div className="relative">
66+
<h1 id="greeting" className="text-2xl md:text-3xl text-slate-800 font-bold mb-1">{`Welcome, ${name}.`} <span onClick={EasterEggClick}>👋</span></h1>
67+
<p className='text-gray-600'>Here is what’s happening with your projects today:</p>
68+
</div>
69+
70+
</div>
71+
);
72+
73+
}
74+
75+
76+
export default WelcomeBanner;
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
import React, {useState} from 'react';
2+
3+
4+
function WelcomeBanner() {
5+
const name = localStorage.getItem('name')
6+
7+
const [Click, setClick] = useState(0);
8+
9+
const EasterEggClick = () => {
10+
const newClick = Click + 1;
11+
setClick(newClick);
12+
console.log(newClick);
13+
if (newClick === 3) {
14+
alert("You've found the easter egg!");
15+
window.location.replace(https://www.youtube.com/watch?v=rRPQs_kM_nw');
16+
}
17+
}
18+
19+
return (
20+
<div className="relative bg-indigo-200 p-4 sm:p-6 rounded-sm overflow-hidden mb-8">
21+
22+
{/* Background illustration */}
23+
<div className="absolute right-0 top-0 -mt-4 mr-16 pointer-events-none hidden xl:block" aria-hidden="true">
24+
<svg width="319" height="198" xmlnsXlink="http://www.w3.org/1999/xlink">
25+
<defs>
26+
<path id="welcome-a" d="M64 0l64 128-64-20-64 20z" />
27+
<path id="welcome-e" d="M40 0l40 80-40-12.5L0 80z" />
28+
<path id="welcome-g" d="M40 0l40 80-40-12.5L0 80z" />
29+
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="welcome-b">
30+
<stop stopColor="#A5B4FC" offset="0%" />
31+
<stop stopColor="#818CF8" offset="100%" />
32+
</linearGradient>
33+
<linearGradient x1="50%" y1="24.537%" x2="50%" y2="100%" id="welcome-c">
34+
<stop stopColor="#4338CA" offset="0%" />
35+
<stop stopColor="#6366F1" stopOpacity="0" offset="100%" />
36+
</linearGradient>
37+
</defs>
38+
<g fill="none" fillRule="evenodd">
39+
<g transform="rotate(64 36.592 105.604)">
40+
<mask id="welcome-d" fill="#fff">
41+
<use xlinkHref="#welcome-a" />
42+
</mask>
43+
<use fill="url(#welcome-b)" xlinkHref="#welcome-a" />
44+
<path fill="url(#welcome-c)" mask="url(#welcome-d)" d="M64-24h80v152H64z" />
45+
</g>
46+
<g transform="rotate(-51 91.324 -105.372)">
47+
<mask id="welcome-f" fill="#fff">
48+
<use xlinkHref="#welcome-e" />
49+
</mask>
50+
<use fill="url(#welcome-b)" xlinkHref="#welcome-e" />
51+
<path fill="url(#welcome-c)" mask="url(#welcome-f)" d="M40.333-15.147h50v95h-50z" />
52+
</g>
53+
<g transform="rotate(44 61.546 392.623)">
54+
<mask id="welcome-h" fill="#fff">
55+
<use xlinkHref="#welcome-g" />
56+
</mask>
57+
<use fill="url(#welcome-b)" xlinkHref="#welcome-g" />
58+
<path fill="url(#welcome-c)" mask="url(#welcome-h)" d="M40.333-15.147h50v95h-50z" />
59+
</g>
60+
</g>
61+
</svg>
62+
</div>
63+
64+
{/* Content */}
65+
<div className="relative">
66+
<h1 id="greeting" className="text-2xl md:text-3xl text-slate-800 font-bold mb-1">{`Welcome, ${name}.`} <span onClick={EasterEggClick}>👋</span></h1>
67+
<p className='text-gray-600'>Here is what’s happening with your projects today:</p>
68+
</div>
69+
70+
</div>
71+
);
72+
73+
}
74+
75+
76+
export default WelcomeBanner;

0 commit comments

Comments
 (0)