Skip to content
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

Refactor/NS-24-improve-src-directory-structure #60

Merged
merged 2 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { PropsWithChildren } from 'react';
import type { Metadata } from 'next';

import { Footer } from '@/components/footer';
import { Header } from '@/components/header';
import { Navbar } from '@/components/navbar/navbar';
import { ThemeProvider } from '@/components/theme-provider';
import { siteConfig } from '@/lib/constant';
import { fonts } from '@/lib/fonts';
Expand Down Expand Up @@ -49,7 +49,7 @@ const RootLayout = ({ children }: PropsWithChildren) => {
<html lang="en" suppressHydrationWarning>
<body className={cn('min-h-screen font-sans', fonts)}>
<ThemeProvider attribute="class">
<Header />
<Navbar />
{children}
<Footer />
</ThemeProvider>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import Link from 'next/link';
import { getServerSession } from 'next-auth';

import { authOptions } from '@/app/api/auth/[...nextauth]/auth-options';
import { SignInButton } from '@/components/sign-in-button';
import { ThemeToggle } from '@/components/theme-toggle';
import { UserDropdown } from '@/components/user-dropdown';
import { SignInButton } from '@/components/navbar/sign-in-button';
import { ThemeToggle } from '@/components/navbar/theme-toggle';
import { UserDropdown } from '@/components/navbar/user-dropdown';

export const Header = async () => {
export const Navbar = async () => {
const session = await getServerSession(authOptions);

return (
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const UserDropdown = ({ session }: { session: Session }) => {
<DropdownMenu>
<DropdownMenuTrigger>
<Image
className="overflow-hidden rounded-full"
src={`${session.user?.image}`}
alt={`${session.user?.name}`}
width={32}
Expand Down
6 changes: 6 additions & 0 deletions src/types/user.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export type TUser = {
id: string;
email: string;
name: string;
image: string;
};
Loading