Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Suraj-kumar00 committed Oct 21, 2024
2 parents 33fcffa + aef8751 commit 5208464
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 13 deletions.
55 changes: 55 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/raise_pull_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
## Description
<!--Please include a summary of the changes made in this pull request. Mention any important details that the reviewers need to be aware of -->

<br><br>

## Issue Number
Fixes:[#issue-number] <br>
Closes:[#issue-number]

<!-- Example: Fixes #1234 -->

<br><br>

## Changes Made
<!-- List the main changes that you made:
- Change 1
- Change 2
- Change 3 -->

<br><br>

## Type Of Change
<!--Please mark the relevant options with an "x": -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update

## Screenshots or Videos
<!-- If the changes include visual modifications, please add screenshots or videos to help understand the impact of the changes -->

<br><br>

## How Has This Been Tested?
<!-- Please describe the tests you ran to verify your changes. Include any test configurations:
- Test A
- Test B -->

<br><br>

## Checklist
<!-- Please mark the relevant options with an "x": -->
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented on my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes

## Additional Information
<!-- Add any other context about the pull request here. -->

<br><br>
13 changes: 6 additions & 7 deletions src/app/(dashboard)/generate/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import Flashcard from "@/components/core/flash-card";

export default async function GeneratePage() {

return (
<div className="page-container bg-slate-50">
<Flashcard />
</div>
)
}
return (
<div className="page-container bg-slate-50 dark:bg-black">
<Flashcard />
</div>
);
}
22 changes: 16 additions & 6 deletions src/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ import * as React from "react";
import Link from "next/link";
import MaxWidthWrapper from "./MaxWidthWrapper";
import { buttonVariants } from "./ui/button";
import { ArrowRight, Moon, Sun } from "lucide-react";
import { ArrowRight } from "lucide-react";
import { useTheme } from "next-themes";
import { UserButton, useUser } from "@clerk/nextjs"; // Added useUser
import { UserButton, useUser } from "@clerk/nextjs";
import { ThemeToggle } from "./DarkToggle";
import Image from "next/image";

const Navbar = () => {
const { setTheme } = useTheme();
const { isSignedIn } = useUser(); // Get user's sign-in state
const { isSignedIn, user } = useUser(); // Get user's sign-in state

return (
<nav className="sticky h-14 inset-x-0 top-0 z-30 w-full bg-primary-foreground/60 backdrop-blur-3xl transition-all">
<nav className="sticky h-14 inset-x-0 top-0 z-30 w-full bg-primary-foreground/60 backdrop-blur-3xl transition-all">
<MaxWidthWrapper>
<div className="flex h-14 items-center justify-between ">
<div className="flex h-14 items-center justify-between">
{/* Logo and Name */}
<Link
href="/"
Expand Down Expand Up @@ -46,6 +46,7 @@ const Navbar = () => {
>
Pricing
</Link>

{/* Show Sign-in and Sign-up only if the user is not signed in */}
{!isSignedIn && (
<>
Expand All @@ -72,8 +73,17 @@ const Navbar = () => {
</>
)}
</div>

{/* User profile and logout button */}
{isSignedIn && <UserButton showName afterSignOutUrl="/" />}
{isSignedIn && (
<div className="flex items-center space-x-2 text-gray-800 dark:text-gray-200">
<span className="text-sm font-medium">
{user.fullName || user.username}
</span>
<UserButton afterSignOutUrl="/" />
</div>
)}

<ThemeToggle />
</div>
</div>
Expand Down

0 comments on commit 5208464

Please sign in to comment.