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
13 changes: 2 additions & 11 deletions scripts/validate-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ function checkForConsoleStatements(content, filePath) {
}

function validateFiles() {
console.log('🔍 Running UI validation checks...\n');

for (const dir of COMPONENT_DIRS) {
const fullDir = path.join(SRC_DIR, dir);
const files = getAllFiles(fullDir);
Expand All @@ -111,20 +109,13 @@ function validateFiles() {

function printResults() {
if (warnings.length > 0) {
console.log('⚠️ Warnings:\n');
warnings.forEach((w) => console.log(` ${w}`));
console.log('');
warnings.forEach((w) => {});
}

if (errors.length > 0) {
console.log('❌ Errors:\n');
errors.forEach((e) => console.log(` ${e}`));
console.log('');
console.log(`\n❌ UI validation failed with ${errors.length} error(s)`);
errors.forEach((e) => {});
process.exit(1);
}

console.log(`✅ UI validation passed (${warnings.length} warning(s))`);
process.exit(0);
}

Expand Down
11 changes: 2 additions & 9 deletions scripts/validate-web3.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,23 +76,16 @@ function checkEnvExample() {
}

function printResults() {
console.log('🔍 Running Web3 validation checks...\n');

checkWalletProviderExists();
checkWeb3Utils();
checkEnvExample();

if (warnings.length > 0) {
console.log('⚠️ Warnings:\n');
warnings.forEach((w) => console.log(` ${w}`));
console.log('');
warnings.forEach((w) => {});
}

if (errors.length > 0) {
console.log('❌ Errors:\n');
errors.forEach((e) => console.log(` ${e}`));
console.log('');
console.log(`\n❌ Web3 validation failed with ${errors.length} error(s)`);
errors.forEach((e) => {});
process.exit(1);
}

Expand Down
38 changes: 16 additions & 22 deletions src/app/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,30 +59,24 @@ const sampleTranscript = [
];

function App() {
const handleProgress = (progress: number) => {
console.log('Video progress:', progress);
};
const handleProgress = (progress: number) => {};

const handleBookmark = (bookmark: { time: number; title: string; note?: string }) => {
console.log('New bookmark:', bookmark);
};
const handleBookmark = (bookmark: { time: number; title: string; note?: string }) => {};

const handleNote = (note: { time: number; text: string }) => {
console.log('New note:', note);
};
const handleNote = (note: { time: number; text: string }) => {};

return (
<div className="min-h-screen bg-gray-100 p-8">
<div className="min-h-screen p-8 bg-gray-100">
<div className="max-w-6xl mx-auto">
<div className="mb-8">
<h1 className="text-3xl font-bold text-gray-900 mb-2">Enhanced Video Player Demo</h1>
<h1 className="mb-2 text-3xl font-bold text-gray-900">Enhanced Video Player Demo</h1>
<p className="text-gray-600">
A comprehensive video player with learning features including bookmarks, notes, and
transcript synchronization.
</p>
</div>

<div className="bg-white rounded-lg shadow-lg p-6">
<div className="p-6 bg-white rounded-lg shadow-lg">
<VideoPlayer
src="https://sample-videos.com/zip/10/mp4/SampleVideo_1280x720_1mb.mp4"
poster="https://via.placeholder.com/1280x720/2563eb/ffffff?text=Video+Player+Demo"
Expand All @@ -94,9 +88,9 @@ function App() {
/>
</div>

<div className="mt-8 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
<div className="bg-white rounded-lg shadow p-6">
<h3 className="text-lg font-semibold text-gray-900 mb-2">🎯 Features</h3>
<div className="grid grid-cols-1 gap-6 mt-8 md:grid-cols-2 lg:grid-cols-3">
<div className="p-6 bg-white rounded-lg shadow">
<h3 className="mb-2 text-lg font-semibold text-gray-900">🎯 Features</h3>
<ul className="space-y-2 text-sm text-gray-600">
<li>• Custom video controls</li>
<li>• Playback speed control</li>
Expand All @@ -106,8 +100,8 @@ function App() {
</ul>
</div>

<div className="bg-white rounded-lg shadow p-6">
<h3 className="text-lg font-semibold text-gray-900 mb-2">📝 Learning Tools</h3>
<div className="p-6 bg-white rounded-lg shadow">
<h3 className="mb-2 text-lg font-semibold text-gray-900">📝 Learning Tools</h3>
<ul className="space-y-2 text-sm text-gray-600">
<li>• Interactive bookmarks</li>
<li>• Timestamped notes</li>
Expand All @@ -117,8 +111,8 @@ function App() {
</ul>
</div>

<div className="bg-white rounded-lg shadow p-6">
<h3 className="text-lg font-semibold text-gray-900 mb-2">🎨 UI/UX</h3>
<div className="p-6 bg-white rounded-lg shadow">
<h3 className="mb-2 text-lg font-semibold text-gray-900">🎨 UI/UX</h3>
<ul className="space-y-2 text-sm text-gray-600">
<li>• Beautiful animations</li>
<li>• Responsive design</li>
Expand All @@ -129,9 +123,9 @@ function App() {
</div>
</div>

<div className="mt-8 bg-white rounded-lg shadow p-6">
<h3 className="text-lg font-semibold text-gray-900 mb-4">Keyboard Shortcuts</h3>
<div className="grid grid-cols-2 md:grid-cols-4 gap-4 text-sm">
<div className="p-6 mt-8 bg-white rounded-lg shadow">
<h3 className="mb-4 text-lg font-semibold text-gray-900">Keyboard Shortcuts</h3>
<div className="grid grid-cols-2 gap-4 text-sm md:grid-cols-4">
<div className="flex justify-between">
<span className="text-gray-600">Space</span>
<span className="font-medium">Play/Pause</span>
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/courses/EnrollmentCTA.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default function EnrollmentCTA({
popular: true,
},
],
onEnroll = (optionId) => console.log('Enrolling in option:', optionId),
onEnroll = (optionId) => {},
}: EnrollmentCTAProps) {
return (
<div className="bg-white dark:bg-[#1E293B] rounded-xl shadow-sm border border-[#E2E8F0] dark:border-[#334155] p-6 lg:sticky lg:top-6">
Expand Down Expand Up @@ -64,7 +64,7 @@ export default function EnrollmentCTA({
</span>
<span className="text-[#64748B] dark:text-[#94A3B8] text-sm ml-1">/one-time</span>
</div>
<ul className="space-y-3 mb-6">
<ul className="mb-6 space-y-3">
{option.features.map((feature, index) => (
<li key={index} className="flex items-start gap-2 text-sm">
<svg
Expand Down
37 changes: 16 additions & 21 deletions src/app/components/profile/ProfileEditForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,16 @@ export default function ProfileEditForm() {

return (
<form onSubmit={handleSubmit(onSubmit)} className="space-y-8">
<div className="bg-white rounded-lg shadow-md p-6">
<h2 className="text-xl font-semibold mb-6">Personal Information</h2>
<div className="p-6 bg-white rounded-lg shadow-md">
<h2 className="mb-6 text-xl font-semibold">Personal Information</h2>

<div className="mb-6">
<ImageUploader
onImageSelect={(file) => {
// Handle image upload
console.log('Selected image:', file);
}}
/>
<ImageUploader onImageSelect={(file) => {}} />
</div>

<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
<div className="grid grid-cols-1 gap-6 md:grid-cols-2">
<div>
<label className="block text-sm font-medium text-gray-700 mb-1">First Name</label>
<label className="block mb-1 text-sm font-medium text-gray-700">First Name</label>
<input
type="text"
{...register('firstName')}
Expand All @@ -80,7 +75,7 @@ export default function ProfileEditForm() {
</div>

<div>
<label className="block text-sm font-medium text-gray-700 mb-1">Last Name</label>
<label className="block mb-1 text-sm font-medium text-gray-700">Last Name</label>
<input
type="text"
{...register('lastName')}
Expand All @@ -91,7 +86,7 @@ export default function ProfileEditForm() {
</div>

<div className="mt-6">
<label className="block text-sm font-medium text-gray-700 mb-1">Email</label>
<label className="block mb-1 text-sm font-medium text-gray-700">Email</label>
<input
type="email"
{...register('email')}
Expand All @@ -101,7 +96,7 @@ export default function ProfileEditForm() {
</div>

<div className="mt-6">
<label className="block text-sm font-medium text-gray-700 mb-1">Bio</label>
<label className="block mb-1 text-sm font-medium text-gray-700">Bio</label>
<textarea
{...register('bio')}
rows={4}
Expand All @@ -111,7 +106,7 @@ export default function ProfileEditForm() {
</div>

<div className="mt-6">
<label className="block text-sm font-medium text-gray-700 mb-1">Location</label>
<label className="block mb-1 text-sm font-medium text-gray-700">Location</label>
<input
type="text"
{...register('location')}
Expand All @@ -120,12 +115,12 @@ export default function ProfileEditForm() {
</div>
</div>

<div className="bg-white rounded-lg shadow-md p-6">
<h2 className="text-xl font-semibold mb-6">Social Links</h2>
<div className="p-6 bg-white rounded-lg shadow-md">
<h2 className="mb-6 text-xl font-semibold">Social Links</h2>

<div className="space-y-6">
<div>
<label className="block text-sm font-medium text-gray-700 mb-1">Website</label>
<label className="block mb-1 text-sm font-medium text-gray-700">Website</label>
<input
type="url"
{...register('website')}
Expand All @@ -135,7 +130,7 @@ export default function ProfileEditForm() {
</div>

<div>
<label className="block text-sm font-medium text-gray-700 mb-1">Twitter</label>
<label className="block mb-1 text-sm font-medium text-gray-700">Twitter</label>
<input
type="text"
{...register('twitter')}
Expand All @@ -144,7 +139,7 @@ export default function ProfileEditForm() {
</div>

<div>
<label className="block text-sm font-medium text-gray-700 mb-1">GitHub</label>
<label className="block mb-1 text-sm font-medium text-gray-700">GitHub</label>
<input
type="text"
{...register('github')}
Expand All @@ -153,7 +148,7 @@ export default function ProfileEditForm() {
</div>

<div>
<label className="block text-sm font-medium text-gray-700 mb-1">LinkedIn</label>
<label className="block mb-1 text-sm font-medium text-gray-700">LinkedIn</label>
<input
type="text"
{...register('linkedin')}
Expand All @@ -169,7 +164,7 @@ export default function ProfileEditForm() {
<button
type="submit"
disabled={isLoading}
className="px-6 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 disabled:opacity-50"
className="px-6 py-2 text-white bg-blue-600 rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 disabled:opacity-50"
>
{isLoading ? 'Saving...' : 'Save Changes'}
</button>
Expand Down
Loading
Loading