Skip to content

Commit

Permalink
feat: Rebase with navigation-menu branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian-Bright committed Oct 13, 2023
2 parents bd9702f + 9896fec commit 9ae5453
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 25 deletions.
2 changes: 1 addition & 1 deletion app/(stateless-toolbar)/me/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const Account = () => {
<Row>
<p className="font-semibold">Network</p>
<div className="inline-flex items-center gap-2">
<div className="bg-green-500 h-2 w-2 rounded-full"></div>
<div className="h-2 w-2 rounded-full bg-green-500"></div>
<p>Sepolia</p>
</div>
</Row>
Expand Down
12 changes: 6 additions & 6 deletions app/(stateless-toolbar)/sign-in/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,15 @@ const SignIn = () => {
loading={isLoading}
disabled={isLoading}
onClick={clickLetMeInHandler}
className="border-green-500 text-green-500 w-full rounded-full py-6"
className="w-full rounded-full border-green-500 py-6 text-green-500"
>
Let me in
</Button>
<Button
variant="outline"
disabled={isLoading}
onClick={clickDeleteHandler}
className="text-green-500 w-full rounded-full border-transparent py-6"
className="w-full rounded-full border-transparent py-6 text-green-500"
>
Delete local key
</Button>
Expand All @@ -169,7 +169,7 @@ const SignIn = () => {
loading={isLoading}
disabled={isLoading}
onClick={clickStartJourneyHandler}
className="border-green-500 text-green-500 rounded-full py-6"
className="rounded-full border-green-500 py-6 text-green-500"
>
Start your journey
</Button>
Expand All @@ -187,7 +187,7 @@ const SignIn = () => {
loading={isLoading}
disabled={isLoading}
onClick={clickLoadKeyHandler}
className="border-green-500 text-green-500 rounded-full py-6"
className="rounded-full border-green-500 py-6 text-green-500"
>
Load key
</Button>
Expand All @@ -196,7 +196,7 @@ const SignIn = () => {
loading={isLoading}
disabled={isLoading}
onClick={clickCancelKeyHandler}
className="text-green-500 hover:border-green-500 mt-4 rounded-full border-transparent py-6"
className="mt-4 rounded-full border-transparent py-6 text-green-500 hover:border-green-500"
>
Cancel
</Button>
Expand All @@ -208,7 +208,7 @@ const SignIn = () => {
loading={isLoading}
disabled={isLoading}
onClick={clickAlreadyHaveKeyHandler}
className="text-green-500 hover:border-green-500 mt-4 rounded-full border-transparent py-6"
className="mt-4 rounded-full border-transparent py-6 text-green-500 hover:border-green-500"
>
Do you have a key to upload?
</Button>
Expand Down
6 changes: 3 additions & 3 deletions app/(stateless-toolbar)/sign-up/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ const SignUp = () => {
loading={isLoading}
loadingText="Generating key..."
onClick={clickDownloadKeyHandler}
className="border-green-500 text-green-500 rounded-full py-6"
className="rounded-full border-green-500 py-6 text-green-500"
>
Download my private key
</Button>
{isKeyDownloaded && (
<Button
variant="outline"
onClick={clickAllDoneHandler}
className="border-green-500 text-green-500 hover:border-green-500 mt-4 rounded-full py-6"
className="mt-4 rounded-full border-green-500 py-6 text-green-500 hover:border-green-500"
>
All done
</Button>
Expand All @@ -129,7 +129,7 @@ const SignUp = () => {
loading={isLoading}
disabled={isLoading}
onClick={clickCreateAccountHandler}
className="border-green-500 text-green-500 w-full rounded-full py-6"
className="w-full rounded-full border-green-500 py-6 text-green-500"
>
Create account
</Button>
Expand Down
2 changes: 1 addition & 1 deletion app/(stateless-toolbar)/submit-tag/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const SubmitTag = () => {
loading={isLoading}
disabled={isLoading}
onClick={onClickCreateHandler}
className="border-green-500 text-green-500 rounded-full py-6"
className="rounded-full border-green-500 py-6 text-green-500"
>
Share it with the world
</Button>
Expand Down
2 changes: 1 addition & 1 deletion app/(stateless-toolbar)/submit-url/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const SubmitUrl = () => {
loading={isLoading}
disabled={isLoading}
onClick={onClickShareItHandler}
className="border-green-500 text-green-500 rounded-full py-6"
className="rounded-full border-green-500 py-6 text-green-500"
>
Share it with the world
</Button>
Expand Down
20 changes: 10 additions & 10 deletions components/main-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ export default function MainMenu({ open, onClose }: MainMenuProps) {
{signedIn && (
<div className="mb-4 xs:mb-6">
<Link href={siteConfig.mainNav.addSite.href}>
<div className="flex items-center justify-between border-b border-shark-800 p-3 xs:p-4 transition-all hover:border-c4-green">
<div className="text-sm xs:text-base w-full bg-c4-gradient-separator bg-clip-text text-transparent">
<div className="flex items-center justify-between border-b border-shark-800 p-3 transition-all hover:border-c4-green xs:p-4">
<div className="w-full bg-c4-gradient-separator bg-clip-text text-sm text-transparent xs:text-base">
{siteConfig.mainNav.addSite.title}
</div>
<Image alt="Browser" src={browserIcon} />
</div>
</Link>
<Link href={siteConfig.mainNav.dashboard.href}>
<div className="p-3 xs:p-4 text-sm xs:text-base border-b border-shark-800 p-4 text-shark-300 transition-all hover:border-c4-green hover:text-shark-200">
<div className="border-b border-shark-800 p-3 text-sm text-shark-300 transition-all hover:border-c4-green hover:text-shark-200 xs:p-4 xs:text-base">
{siteConfig.mainNav.dashboard.title}
</div>
</Link>
Expand All @@ -48,13 +48,13 @@ export default function MainMenu({ open, onClose }: MainMenuProps) {
<div className="mb-4 xs:mb-6">
{signedIn ? (
<Link href={siteConfig.mainNav.changeTags.href}>
<div className="p-3 xs:p-4 text-sm xs:text-base border-b border-shark-800 p-4 text-shark-300 transition-all hover:border-c4-green hover:text-shark-200">
<div className="border-b border-shark-800 p-3 text-sm text-shark-300 transition-all hover:border-c4-green hover:text-shark-200 xs:p-4 xs:text-base">
{siteConfig.mainNav.changeTags.title}
</div>
</Link>
) : (
<div
className="p-3 xs:p-4 text-sm xs:text-base border-b border-shark-800 cursor-pointer p-4 text-shark-300 transition-all hover:border-c4-green hover:text-shark-200"
className="cursor-pointer border-b border-shark-800 p-3 text-sm text-shark-300 transition-all hover:border-c4-green hover:text-shark-200 xs:p-4 xs:text-base"
onClick={() => {
signIn()
onClose()
Expand All @@ -64,26 +64,26 @@ export default function MainMenu({ open, onClose }: MainMenuProps) {
</div>
)}
<Link href={siteConfig.mainNav.stats.href}>
<div className="p-3 xs:p-4 text-sm xs:text-base border-b border-shark-800 p-4 text-shark-300 transition-all hover:border-c4-green hover:text-shark-200">
<div className="border-b border-shark-800 p-3 text-sm text-shark-300 transition-all hover:border-c4-green hover:text-shark-200 xs:p-4 xs:text-base">
{siteConfig.mainNav.stats.title}
</div>
</Link>
<Link href={siteConfig.mainNav.about.href}>
<div className="p-3 xs:p-4 text-sm xs:text-base border-b border-shark-800 p-4 text-shark-300 transition-all hover:border-c4-green hover:text-shark-200">
<div className="border-b border-shark-800 p-3 text-sm text-shark-300 transition-all hover:border-c4-green hover:text-shark-200 xs:p-4 xs:text-base">
{siteConfig.mainNav.about.title}
</div>
</Link>
{signedIn && (
<Link href={siteConfig.mainNav.feedback.href}>
<div className="p-3 xs:p-4 text-sm xs:text-base border-b border-shark-800 p-4 text-shark-300 transition-all hover:border-c4-green hover:text-shark-200">
<div className="border-b border-shark-800 p-3 text-sm text-shark-300 transition-all hover:border-c4-green hover:text-shark-200 xs:p-4 xs:text-base">
{siteConfig.mainNav.feedback.title}
</div>
</Link>
)}
</div>
{signedIn && (
<div
className="p-3 xs:p-4 text-sm xs:text-base cursor-pointer p-4 text-shark-300 transition-all hover:text-shark-200"
className="cursor-pointer p-3 text-sm text-shark-300 transition-all hover:text-shark-200 xs:p-4 xs:text-base"
onClick={() => {
signOut()
onClose()
Expand All @@ -93,7 +93,7 @@ export default function MainMenu({ open, onClose }: MainMenuProps) {
</div>
)}
<div
className="p-3 xs:p-4 text-sm xs:text-base flex cursor-pointer items-center justify-between p-4 text-shark-300 transition-colors hover:text-shark-200"
className="flex cursor-pointer items-center justify-between p-3 text-sm text-shark-300 transition-colors hover:text-shark-200 xs:p-4 xs:text-base"
onClick={() => onClose()}
>
<div>Close menu</div>
Expand Down
5 changes: 3 additions & 2 deletions components/site-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function SiteHeader() {
return (
<header className="w-full border-b bg-background">
<div className="container flex h-16 items-center space-x-4 sm:justify-between sm:space-x-0">
<MainNav items={siteConfig.mainNav} />
{/* <MainNav items={siteConfig.mainNav} /> */}
<div className="flex flex-1 items-center justify-end space-x-4">
<nav className="flex items-center space-x-1">
<Link
Expand Down Expand Up @@ -73,7 +73,8 @@ export function SiteHeader() {
</Link>
{/* <ThemeToggle /> */}
{!(password && userId && token) ? (
<SecondaryNav items={siteConfig.secondaryNav} />
// <SecondaryNav items={siteConfig.secondaryNav} />
<></>
) : (
<Button variant="ghost" onClick={onLogOutClickHandler}>
<Icons.logout className="h-5 w-5" />
Expand Down
2 changes: 1 addition & 1 deletion contexts/AuthContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const AuthProvider: React.FC<{ children: JSX.Element }> = ({
}

const signedIn = useMemo(() => {
return web3Auth?.status === "connected" && token && userId
return web3Auth?.status === "connected" && !!token && !!userId
}, [token, userId, web3Auth])

useEffect(() => {
Expand Down

0 comments on commit 9ae5453

Please sign in to comment.