Skip to content

Commit

Permalink
fix searchbar on /search
Browse files Browse the repository at this point in the history
  • Loading branch information
kualta committed Jul 8, 2024
1 parent 6f88242 commit b7bb63e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
9 changes: 0 additions & 9 deletions src/app/api/posts/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,3 @@ async function createPost(client: LensClient, contentURI: string, replyingTo?: s
}
return await client.publication.postOnchain({ contentURI });
}

function handlePostResult(
postResult: Result<
RelaySuccessFragment | LensProfileManagerRelayErrorFragment,
CredentialsExpiredError | NotAuthenticatedError
>,
handle: string,
contentURI: string,
) {}
4 changes: 2 additions & 2 deletions src/components/menu/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ export const SearchButton = () => {
};

export const SearchBar = ({ defaultText = "" }: { defaultText: string }) => {
const router = useRouter();
const formSchema = z.object({ input: z.string() });
const pathname = usePathname();
const router = useRouter();

if (pathname === "/search") {
if (pathname === "/search" && defaultText === "") {
return;
}

Expand Down
4 changes: 1 addition & 3 deletions src/components/menu/Sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { BellIcon, Bookmark, BookmarkIcon, MailIcon } from "lucide-react";
import { BellIcon, BookmarkIcon, MailIcon } from "lucide-react";
import Link from "next/link";
import { getCookieAuth } from "~/utils/getCookieAuth";
import { getLensClient } from "~/utils/getLensClient";
import { ServerSignedIn } from "../ServerSignedIn";
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "../ui/accordion";
import { Badge } from "../ui/badge";
import { Button } from "../ui/button";
import { Separator } from "../ui/separator";
import { lensProfileToUser } from "../user/User";
import { UserAvatar } from "../user/UserAvatar";
import { SearchBar } from "./Search";
Expand Down Expand Up @@ -52,7 +51,6 @@ export function Sidebar() {
<div className="flex flex-col w-full gap-4 p-4 grow">
<ServerSignedIn>
<UserBar />
{/* <Separator className="max-w-[150px] mx-auto" /> */}
</ServerSignedIn>
<SearchBar defaultText="" />
<Accordion defaultValue={["beta"]} className="w-full" type="multiple">
Expand Down

0 comments on commit b7bb63e

Please sign in to comment.