-
Notifications
You must be signed in to change notification settings - Fork 136
[feat] add sheet and revamp dashboard #165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
4775fda
feat: add sheet and revamp dashboard
apsinghdev 07582c8
feat(sheet): add completed modules
apsinghdev 664012f
chore: add a note in sheet
apsinghdev 635f378
chore: add a pro btn
apsinghdev 63a4519
fix: coderabbit reviews
apsinghdev 7b54236
fix: import error
apsinghdev 9c655f0
chore: add loading state in account
apsinghdev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
apps/api/prisma/migrations/20251114063002_add_completed_steps/migration.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| -- AlterTable | ||
| ALTER TABLE "User" ADD COLUMN "completedSteps" JSONB; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| "use client"; | ||
|
|
||
| import { useSubscription } from "@/hooks/useSubscription"; | ||
| import Link from "next/link"; | ||
| import { ArrowLeft } from "lucide-react"; | ||
|
|
||
| export default function AccountPage() { | ||
| const { isPaidUser, isLoading } = useSubscription(); | ||
|
|
||
| const plan = isPaidUser ? "Pro" : "Free"; | ||
|
|
||
| return ( | ||
| <div className="w-full h-full flex flex-col p-6 bg-ox-content"> | ||
| {isLoading ? ( | ||
| <div className="flex items-center justify-center h-full"> | ||
| <span className="text-zinc-400">Loading...</span> | ||
| </div> | ||
| ) : ( | ||
| <> | ||
| <div className="mb-6"> | ||
| <Link | ||
| href="/dashboard/home" | ||
| className="inline-flex items-center gap-2 text-ox-purple hover:text-ox-purple-2 transition-colors mb-4" | ||
| > | ||
| <ArrowLeft className="h-4 w-4" /> | ||
| <span>Back to Dashboard</span> | ||
| </Link> | ||
| <h1 className="text-2xl md:text-3xl font-semibold text-white"> | ||
| Account Settings | ||
| </h1> | ||
| </div> | ||
|
|
||
| <div className="bg-ox-sidebar border border-ox-header rounded-lg p-6 max-w-2xl"> | ||
| <div className="space-y-4"> | ||
| <div> | ||
| <label className="text-sm text-zinc-400 mb-2 block">Plan</label> | ||
| <div className="flex items-center gap-2"> | ||
| <span className="text-lg font-semibold text-white"> | ||
| {plan} | ||
| </span> | ||
| {isPaidUser && ( | ||
| <span className="px-2 py-0.5 rounded-full bg-ox-purple/20 border border-ox-purple text-ox-purple text-xs font-medium"> | ||
| Active | ||
| </span> | ||
| )} | ||
| </div> | ||
| </div> | ||
| {!isPaidUser && ( | ||
| <div> | ||
| <Link | ||
| href="/pricing" | ||
| className="inline-flex items-center justify-center px-3 py-1.5 bg-ox-purple hover:bg-ox-purple-2 text-white rounded-md transition-colors text-xs font-medium" | ||
| > | ||
| be a pro | ||
| </Link> | ||
| </div> | ||
| )} | ||
| </div> | ||
| </div> | ||
| </> | ||
| )} | ||
| </div> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| "use client"; | ||
|
|
||
| import { useSubscription } from "@/hooks/useSubscription"; | ||
| import { useRouter } from "next/navigation"; | ||
| import { useEffect } from "react"; | ||
|
|
||
| export default function ProDashboardPage() { | ||
| const { isPaidUser, isLoading } = useSubscription(); | ||
| const router = useRouter(); | ||
|
|
||
| useEffect(() => { | ||
| if (!isLoading && !isPaidUser) { | ||
| router.push("/pricing"); | ||
| } | ||
| }, [isPaidUser, isLoading, router]); | ||
|
|
||
| if (isLoading) { | ||
| return ( | ||
| <div className="w-full h-full flex items-center justify-center bg-ox-content"> | ||
| <p className="text-white">Loading...</p> | ||
| </div> | ||
| ); | ||
| } | ||
|
|
||
| if (!isPaidUser) { | ||
| return null; | ||
| } | ||
|
|
||
| return ( | ||
| <div className="w-full h-full flex items-center justify-center bg-ox-content p-6"> | ||
| <div className="max-w-2xl mx-auto text-center"> | ||
| <h1 className="text-2xl md:text-3xl font-semibold text-white mb-4"> | ||
| hi investors, ajeetunc is on the way to deliver the shareholder value. | ||
| soon you'll see all the pro perks here. thanks for investing | ||
| </h1> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.