Skip to content

Commit

Permalink
fixed layout
Browse files Browse the repository at this point in the history
  • Loading branch information
hkirat committed Feb 1, 2024
1 parent 1754089 commit 772f6a6
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 43 deletions.
89 changes: 46 additions & 43 deletions src/components/Appbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,58 +15,61 @@ export const Appbar = () => {
const session = useSession();

return (
<nav className="fixed z-50 top-0 px-4 w-full h-16 border-b shadow-sm bg-background/80 backdrop-blur-md flex items-center">
<div className="md:max-w-screen-2xl mx-auto flex items-center justify-between w-full">
<Logo onFooter={false} />
<>
<nav className="fixed z-50 top-0 px-4 w-full h-16 border-b shadow-sm bg-background/80 backdrop-blur-md flex items-center">
<div className="md:max-w-screen-2xl mx-auto flex items-center justify-between w-full">
<Logo onFooter={false} />

{session?.data?.user ? (
<div className="flex items-center space-x-2">
<div className="hidden sm:flex items-center justify-around md:w-auto md:block space-x-2">
<Button variant={'link'} size={'sm'} asChild>
<JoinDiscord isNavigated={false} />
</Button>
{session?.data?.user ? (
<div className="flex items-center space-x-2">
<div className="hidden sm:flex items-center justify-around md:w-auto md:block space-x-2">
<Button variant={'link'} size={'sm'} asChild>
<JoinDiscord isNavigated={false} />
</Button>

<Button size={'sm'} variant={'link'} asChild>
<Link
href={'https://github.com/100xdevs-cohort-2/assignments'}
target="_blank"
>
Assignments
</Link>
</Button>
<Button size={'sm'} variant={'link'} asChild>
<Link
href={'https://github.com/100xdevs-cohort-2/assignments'}
target="_blank"
>
Assignments
</Link>
</Button>

<AppbarAuth />
</div>
<AppbarAuth />
</div>

<ThemeToggler />
<ThemeToggler />

<div className="block sm:hidden">
<NavigationMenu />
<div className="block sm:hidden">
<NavigationMenu />
</div>
</div>
</div>
) : (
<div className="flex items-center space-x-2">
<div className="hidden sm:flex items-center justify-around md:w-auto md:block space-x-3">
<AppbarAuth />
) : (
<div className="flex items-center space-x-2">
<div className="hidden sm:flex items-center justify-around md:w-auto md:block space-x-3">
<AppbarAuth />

<Button size={'sm'} asChild>
<Link
href={'https://harkirat.classx.co.in/new-courses'}
target="_blank"
>
Join now <Sparkles className="ml-1 h-4 w-4" />
</Link>
</Button>
</div>
<Button size={'sm'} asChild>
<Link
href={'https://harkirat.classx.co.in/new-courses'}
target="_blank"
>
Join now <Sparkles className="ml-1 h-4 w-4" />
</Link>
</Button>
</div>

<ThemeToggler />
<ThemeToggler />

<div className="block sm:hidden">
<NavigationMenu />
<div className="block sm:hidden">
<NavigationMenu />
</div>
</div>
</div>
)}
</div>
</nav>
)}
</div>
</nav>
<div className="h-16 w-full" />
</>
);
};
1 change: 1 addition & 0 deletions src/utiles/appx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const APPX_BASE_API = process.env.APPX_BASE_API;
const LOCAL_CMS_PROVIDER = process.env.LOCAL_CMS_PROVIDER;

export async function getPurchases(email: string) {
return [];
const courses = await db.course.findMany({});
if (LOCAL_CMS_PROVIDER) {
return courses;
Expand Down

0 comments on commit 772f6a6

Please sign in to comment.