-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: ♻️ Refactor code and improvements.
- Refactor code structure and dependencies. Update project structure.
- Loading branch information
1 parent
3bfd566
commit de619ba
Showing
14 changed files
with
1,979 additions
and
50 deletions.
There are no files selected for viewing
This file contains 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 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,9 @@ | ||
//import { } from ' '; | ||
|
||
type HomePageProps = {}; | ||
|
||
const HomePage = ({}: HomePageProps) => { | ||
return <div> HomePage </div>; | ||
}; | ||
|
||
export default HomePage; |
This file contains 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,16 @@ | ||
import Navbar from "@/components/navigation/navbar"; | ||
|
||
type MainLayoutProps = { | ||
children: React.ReactNode; | ||
}; | ||
|
||
const MainLayout = ({ children }: MainLayoutProps) => { | ||
return ( | ||
<> | ||
<Navbar /> | ||
<div className="container max-w-7xl mx-auto h-full pt-12">{children}</div> | ||
</> | ||
); | ||
}; | ||
|
||
export default MainLayout; |
This file contains 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 was deleted.
Oops, something went wrong.
This file contains 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,43 @@ | ||
import { LucideProps, MessageSquare, User } from "lucide-react"; | ||
import Image from "next/image"; | ||
import SpreadIt from "./spreadit.svg"; | ||
|
||
export const Icons = { | ||
user: User, | ||
logo: () => ( | ||
<Image | ||
src={SpreadIt} | ||
alt="SpreadIt Logo" | ||
width={200} | ||
height={200} | ||
/> | ||
), | ||
google: (props: LucideProps) => ( | ||
<svg | ||
{...props} | ||
viewBox="0 0 24 24" | ||
> | ||
<path | ||
d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z" | ||
fill="#4285F4" | ||
/> | ||
<path | ||
d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" | ||
fill="#34A853" | ||
/> | ||
<path | ||
d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z" | ||
fill="#FBBC05" | ||
/> | ||
<path | ||
d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" | ||
fill="#EA4335" | ||
/> | ||
<path | ||
d="M1 1h22v22H1z" | ||
fill="none" | ||
/> | ||
</svg> | ||
), | ||
commentReply: MessageSquare, | ||
}; |
This file contains 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,44 @@ | ||
// import { authOptions } from "@/lib/auth"; | ||
// import { getServerSession } from "next-auth"; | ||
import Link from "next/link"; | ||
// import { Icons } from "./Icons"; | ||
import { buttonVariants } from "../ui/button"; | ||
// import { UserAccountNav } from "./UserAccountNav"; | ||
// import SearchBar from "./SearchBar"; | ||
|
||
const Navbar = async () => { | ||
// const session = await getServerSession(authOptions); | ||
return ( | ||
<div className="fixed top-0 inset-x-0 h-fit bg-neutral-100 border-b border-neutral-300 z-[10] py-2"> | ||
<div className="container max-w-7xl h-full mx-auto flex items-center justify-between gap-2"> | ||
{/* logo */} | ||
<Link | ||
href="/" | ||
className="flex gap-2 items-center" | ||
> | ||
{/* <Icons.logo className="h-8 w-8 sm:h-6 sm:w-6" /> */} | ||
<p className="hidden text-neutral-700 text-sm font-medium md:block"> | ||
SpreadIt | ||
</p> | ||
</Link> | ||
|
||
{/* search bar */} | ||
{/* <SearchBar /> */} | ||
|
||
{/* actions */} | ||
{/* {session?.user ? ( | ||
<UserAccountNav user={session.user} /> | ||
) : ( | ||
<Link | ||
href="/sign-in" | ||
className={buttonVariants()} | ||
> | ||
Sign In | ||
</Link> | ||
)} */} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Navbar; |
This file contains 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,73 @@ | ||
import * as React from "react"; | ||
import { Slot } from "@radix-ui/react-slot"; | ||
import { cva, type VariantProps } from "class-variance-authority"; | ||
import { Loader2 } from "lucide-react"; | ||
|
||
import { cn } from "@/lib/utils"; | ||
|
||
const buttonVariants = cva( | ||
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", | ||
{ | ||
variants: { | ||
variant: { | ||
default: "bg-primary text-primary-foreground hover:bg-primary/90", | ||
destructive: | ||
"bg-destructive text-destructive-foreground hover:bg-destructive/90", | ||
outline: | ||
"border border-input bg-background hover:bg-accent hover:text-accent-foreground", | ||
secondary: | ||
"bg-secondary text-secondary-foreground hover:bg-secondary/80", | ||
ghost: "hover:bg-accent hover:text-accent-foreground", | ||
link: "text-primary underline-offset-4 hover:underline", | ||
}, | ||
size: { | ||
default: "h-10 px-4 py-2", | ||
sm: "h-9 rounded-md px-3", | ||
lg: "h-11 rounded-md px-8", | ||
icon: "h-10 w-10", | ||
}, | ||
}, | ||
defaultVariants: { | ||
variant: "default", | ||
size: "default", | ||
}, | ||
} | ||
); | ||
|
||
export interface ButtonProps | ||
extends React.ButtonHTMLAttributes<HTMLButtonElement>, | ||
VariantProps<typeof buttonVariants> { | ||
asChild?: boolean; | ||
isLoading?: boolean; | ||
} | ||
|
||
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>( | ||
( | ||
{ | ||
className, | ||
children, | ||
variant, | ||
isLoading, | ||
size, | ||
asChild = false, | ||
...props | ||
}, | ||
ref | ||
) => { | ||
const Comp = asChild ? Slot : "button"; | ||
return ( | ||
<Comp | ||
className={cn(buttonVariants({ variant, size, className }))} | ||
ref={ref} | ||
disabled={isLoading} | ||
{...props} | ||
> | ||
{isLoading ? <Loader2 className="mr-2 h-4 w-4 animate-spin" /> : null} | ||
{children} | ||
</Comp> | ||
); | ||
} | ||
); | ||
Button.displayName = "Button"; | ||
|
||
export { Button, buttonVariants }; |
Oops, something went wrong.