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

Toasts (Notification Component) #163

Merged
merged 30 commits into from
May 26, 2023
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
2d89ec0
feature: responsive navbar
adityanandanx May 24, 2023
ded68b7
style: nav links hover animatiosn
adityanandanx May 24, 2023
6e11578
Merge branch 'main' into mad/ui-improvements
adityanandanx May 25, 2023
df116aa
style: better Input Fields
adityanandanx May 25, 2023
6d5188e
refactor: use form submit instead of button onclick
adityanandanx May 25, 2023
264bfd5
feature: loading states
adityanandanx May 25, 2023
6fdb8ef
feature: log out confirmation
adityanandanx May 25, 2023
791aaf0
feature: basic toast
adityanandanx May 25, 2023
3fb0023
feature: Toast variants
adityanandanx May 25, 2023
380e3a5
fix: use global toast provider
adityanandanx May 25, 2023
19c17f6
feature: use toast instead of alert for auth routes
adityanandanx May 25, 2023
67a3726
fix(mobile): nav menu close on route change
adityanandanx May 25, 2023
f171f5e
fix: field dark mode
adityanandanx May 25, 2023
e00a853
feature: redirect when login and logout
adityanandanx May 25, 2023
0d464f0
refactor: group auth routes
adityanandanx May 25, 2023
6c2c34e
refactor: use @/app imports
adityanandanx May 25, 2023
74464be
Merge branch 'main' into mad/ui-improvements
adityanandanx May 25, 2023
27d5d4e
style: use Field on /upload
adityanandanx May 25, 2023
a892bf4
fix: forward ref
adityanandanx May 25, 2023
25c2948
feature: Multi toast
adityanandanx May 25, 2023
9225847
feature: add toasts to /upload
adityanandanx May 26, 2023
859cfab
Merge branch 'main' into mad/ui-improvements
adityanandanx May 26, 2023
1566008
refactor: new login in auth group
adityanandanx May 26, 2023
20f3f2c
chore: quote
adityanandanx May 26, 2023
6ed8337
chore(pnpm): removed
StanGirard May 26, 2023
339ca68
Merge branch 'main' into mad/ui-improvements
adityanandanx May 26, 2023
2a45a31
feature: toasty animations
adityanandanx May 26, 2023
ebbadb8
fix: build errors and warnings
adityanandanx May 26, 2023
fbee42f
chore: remove irrelevant comments
adityanandanx May 26, 2023
3e64c22
fix: use unique ids for toasts
adityanandanx May 26, 2023
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
Prev Previous commit
Next Next commit
style: nav links hover animatiosn
  • Loading branch information
adityanandanx committed May 24, 2023
commit ded68b7f3ba12e302fb4f2d50a1de3e21b07a82e
36 changes: 20 additions & 16 deletions frontend/app/components/NavBar/NavItems.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { cn } from "@/lib/utils";
import Link from "next/link";
import { FC, HTMLAttributes } from "react";
import { FC, HTMLAttributes, ReactNode } from "react";
import DarkModeToggle from "./DarkModeToggle";
import Button from "../ui/Button";

Expand All @@ -18,24 +18,14 @@ const NavItems: FC<NavItemsProps> = ({ className, ...props }) => {
>
{process.env.NEXT_PUBLIC_ENV === "local" ? (
<>
<li>
<Link href={"/upload"}>Upload</Link>
</li>
<li>
<Link href={"/chat"}>Chat</Link>
</li>
<li>
<Link href={"/explore"}>Explore</Link>
</li>
<NavLink to="/upload">Upload</NavLink>
<NavLink to="/chat">Chat</NavLink>
<NavLink to="/explore">Explore</NavLink>
</>
) : (
<>
<li>
<Link href={"https://github.com/StanGirard/quivr"}>Github</Link>
</li>
<li>
<Link href={"https://discord.gg/HUpRgp2HG8"}>Discord</Link>
</li>
<NavLink to="https://github.com/StanGirard/quivr">Github</NavLink>
<NavLink to="https://discord.gg/HUpRgp2HG8">Discord</NavLink>
</>
)}
<div className="flex sm:flex-1 sm:justify-end flex-col items-center justify-center sm:flex-row gap-5 sm:gap-2">
Expand All @@ -49,4 +39,18 @@ const NavItems: FC<NavItemsProps> = ({ className, ...props }) => {
);
};

interface NavLinkProps {
children: ReactNode;
to: string;
}

const NavLink: FC<NavLinkProps> = ({ children, to }) => {
return (
<li className="group relative">
<Link href={to}>{children}</Link>
<hr className="aboslute top-full border border-transparent border-b-primary dark:border-b-white scale-x-0 group-hover:scale-x-100 group-focus-within:scale-x-100 transition-transform" />
</li>
);
};

export default NavItems;