Skip to content
Merged
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
74 changes: 20 additions & 54 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ export default function Home() {
}

if (data && data.length > 0) {
const hasLinkedIn = data.some(
(provider) => provider.provider.toLowerCase() === "linkedin"
);
const hasLinkedIn = data.some((provider) => provider.provider.toLowerCase() === "linkedin");
if (!hasLinkedIn) {
return true;
}
Expand All @@ -34,55 +32,40 @@ export default function Home() {
const isConnected = !actionNeeded();

return (
<div className="min-h-screen p-4 flex items-center justify-center">
<div className="flex items-center justify-center min-h-screen p-4">
<div className="max-w-2xl mx-auto space-y-8">
{/* Welcome Section */}
<div className="text-center space-y-4">
<h1 className="text-3xl font-bold">
{isConnected ? "Welcome Back to Post0" : "Welcome to Post0"}
</h1>
<p className="text-content4-foreground">
{isConnected
? "Your LinkedIn account is connected. Ready to automate your social media!"
: "Let's get you set up with automated social media posting."}
</p>
<div className="space-y-4 text-center">
<h1 className="text-3xl font-bold">{isConnected ? "Welcome Back to Post0" : "Welcome to Post0"}</h1>
<p className="text-content4-foreground">{isConnected ? "Your LinkedIn account is connected. Ready to automate your social media!" : "Let's get you set up with automated social media posting."}</p>
</div>

{/* Status & Action Card */}
<Card shadow="sm">
<CardBody className="space-y-6 p-6">
<CardBody className="p-6 space-y-6">
<div className="flex items-center justify-center gap-2">
{isConnected ? (
<>
<CheckCircle className="h-5 w-5 text-success" />
<span className="font-semibold text-success">
Account Connected
</span>
<CheckCircle className="w-5 h-5 text-success" />
<span className="font-semibold text-success">Account Connected</span>
</>
) : (
<>
<Clock className="h-5 w-5 text-warning" />
<span className="font-semibold text-warning">
Setup Required
</span>
<Clock className="w-5 h-5 text-warning" />
<span className="font-semibold text-warning">Setup Required</span>
</>
)}
</div>

<div className="space-y-4">
{actionNeeded() ? (
<Link href="/connections">
<Button
color="primary"
size="lg"
className="w-full"
endContent={<ArrowRight className="h-4 w-4" />}
>
<Button color="primary" size="lg" className="w-full" endContent={<ArrowRight className="w-4 h-4" />}>
Connect LinkedIn Account
</Button>
</Link>
) : (
<div className="grid grid-cols-1 sm:grid-cols-2 gap-3">
<div className="grid grid-cols-1 gap-3 sm:grid-cols-2">
<Link href="/schedules">
<Button color="primary" size="lg" className="w-full">
Create Schedule
Expand All @@ -100,47 +83,30 @@ export default function Home() {
</Card>

<Card shadow="sm">
<CardBody className="space-y-4 p-6">
<h2 className="text-xl font-semibold text-center">
How Post0 Works
</h2>
<CardBody className="p-6 space-y-4">
<h2 className="text-xl font-semibold text-center">How Post0 Works</h2>
<div className="space-y-4">
<div className="flex items-start gap-3">
<div className="flex items-center justify-center w-8 h-8 rounded-full bg-primary text-primary-foreground text-sm font-semibold flex-shrink-0">
1
</div>
<div className="flex items-center justify-center flex-shrink-0 w-8 h-8 text-sm font-semibold rounded-full bg-primary text-primary-foreground">1</div>
<div>
<h3 className="font-semibold">Create Schedules</h3>
<p className="text-sm text-content4-foreground">
Set up your posting schedule with custom time slots and
frequency.
</p>
<p className="text-sm text-content4-foreground">Set up your posting schedule with custom time slots and frequency.</p>
</div>
</div>

<div className="flex items-start gap-3">
<div className="flex items-center justify-center w-8 h-8 rounded-full bg-primary text-primary-foreground text-sm font-semibold flex-shrink-0">
2
</div>
<div className="flex items-center justify-center flex-shrink-0 w-8 h-8 text-sm font-semibold rounded-full bg-primary text-primary-foreground">2</div>
<div>
<h3 className="font-semibold">Get Smart Drafts</h3>
<p className="text-sm text-content4-foreground">
Post0 suggests captions and ideas tailored to your brand and
audience — ready to polish.
</p>
<p className="text-sm text-content4-foreground">Post0 suggests captions and ideas tailored to your brand and audience — ready to polish.</p>
</div>
</div>

<div className="flex items-start gap-3">
<div className="flex items-center justify-center w-8 h-8 rounded-full bg-primary text-primary-foreground text-sm font-semibold flex-shrink-0">
3
</div>
<div className="flex items-center justify-center flex-shrink-0 w-8 h-8 text-sm font-semibold rounded-full bg-primary text-primary-foreground">3</div>
<div>
<h3 className="font-semibold">Auto-Publish</h3>
<p className="text-sm text-content4-foreground">
Posts are published automatically to your connected
platforms with your gallery images.
</p>
<p className="text-sm text-content4-foreground">Posts are published automatically to your connected platforms with your gallery images.</p>
</div>
</div>
</div>
Expand Down