refactor: externalize AppPage component and streamline all tool pages

This commit is contained in:
2026-02-25 18:04:32 +01:00
parent 71c22e465e
commit 7eeb8399b3
13 changed files with 113 additions and 139 deletions

View File

@@ -5,6 +5,7 @@ import { ColorPicker } from '@/components/pastel/ColorPicker';
import { ColorDisplay } from '@/components/pastel/ColorDisplay';
import { Button } from '@/components/ui/button';
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
import { AppPage } from '@/components/layout/AppPage';
import { useTextColor } from '@/lib/pastel/api/queries';
import { Loader2, Palette, Plus, X, CheckCircle2, XCircle } from 'lucide-react';
import { toast } from 'sonner';
@@ -55,16 +56,11 @@ export default function TextColorPage() {
};
return (
<div className="min-h-screen py-12">
<div className="max-w-7xl mx-auto px-8 space-y-8">
<div>
<h1 className="text-4xl font-bold mb-2">Text Color Optimizer</h1>
<p className="text-muted-foreground">
Automatically find the best text color (black or white) for any background color
</p>
</div>
<div className="grid grid-cols-1 lg:grid-cols-2 gap-8">
<AppPage
title="Text Color Optimizer"
description="Automatically find the best text color (black or white) for any background color"
>
<div className="grid grid-cols-1 lg:grid-cols-2 gap-8">
{/* Input */}
<div className="space-y-6">
<Card>
@@ -226,7 +222,6 @@ export default function TextColorPage() {
)}
</div>
</div>
</div>
</div>
</AppPage>
);
}