Skip to content

Commit de83022

Browse files
author
“Ayo-Skiller“
committed
Revert "Merge pull request accesslayerorg#20 from joelpeace48-cell/feat/issues-13-16"
This reverts commit 7b0ece9, reversing changes made to f70bd7f.
1 parent 7b0ece9 commit de83022

4 files changed

Lines changed: 26 additions & 68 deletions

File tree

src/components/common/CreatorCard.tsx

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ import { useAccount } from 'wagmi';
22
import { Button } from '@/components/ui/button';
33
import type { Course } from '@/services/course.service';
44
import { cn } from '@/lib/utils';
5-
import { ShoppingCart, Wallet, Link as LinkIcon } from 'lucide-react';
5+
import { ShoppingCart, Wallet } from 'lucide-react';
66
import toast from 'react-hot-toast';
7-
import showToast from '@/utils/toast.util';
87

98
interface CreatorCardProps {
109
creator: Course;
@@ -23,14 +22,10 @@ const CreatorCard: React.FC<CreatorCardProps> = ({ creator, className }) => {
2322
return;
2423
}
2524

26-
showToast.loading(`Purchasing keys for ${creator.title}...`);
25+
toast.success(`Purchasing keys for ${creator.title}...`, {
26+
duration: 3000,
27+
});
2728
// Implementation for contract interaction would go here
28-
setTimeout(() => {
29-
showToast.transactionSuccess(
30-
'Purchase Successful!',
31-
`You successfully bought a key for ${creator.title}`
32-
);
33-
}, 1500);
3429
};
3530

3631
return (
@@ -56,17 +51,6 @@ const CreatorCard: React.FC<CreatorCardProps> = ({ creator, className }) => {
5651
<p className="font-jakarta text-sm text-white/50">
5752
@{creator.instructorId || 'creator'}
5853
</p>
59-
{creator.socialHandle ? (
60-
<div className="mt-2 flex items-center gap-1.5 text-xs text-white/60">
61-
<LinkIcon className="size-3 text-amber-500/70" />
62-
<span className="truncate">@{creator.socialHandle}</span>
63-
</div>
64-
) : (
65-
<div className="mt-2 flex items-center gap-1.5 text-xs text-white/30 italic">
66-
<LinkIcon className="size-3 opacity-50" />
67-
<span>No public handle</span>
68-
</div>
69-
)}
7054
</div>
7155

7256
<div className="flex items-center justify-between gap-4">

src/services/course.service.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ export interface Course {
1010
thumbnail?: string;
1111
category: string;
1212
level: 'BEGINNER' | 'INTERMEDIATE' | 'ADVANCED';
13-
socialHandle?: string;
1413
}
1514

1615
export interface GetCoursesParams {

src/utils/toast.util.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import toast from "react-hot-toast";
2+
3+
const showToast = {
4+
message: (message: string) => {
5+
toast.remove();
6+
toast(message);
7+
},
8+
success: (message: string) => {
9+
toast.remove();
10+
toast.success(message);
11+
},
12+
error: (message: string) => {
13+
toast.remove();
14+
toast.error(message);
15+
},
16+
loading: (message: string) => {
17+
toast.remove();
18+
toast.loading(message);
19+
},
20+
};
21+
22+
export default showToast;

src/utils/toast.util.tsx

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)