Skip to content

Commit bb822c3

Browse files
committed
fix: build issue, #287, #289, #290, #292, #307
1 parent 064ba2b commit bb822c3

6 files changed

Lines changed: 21 additions & 20 deletions

File tree

src/app/upload/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ const Page = () => {
219219
</p>
220220
<div className="mx-auto my-6 w-full max-w-xl rounded-md text-sm text-black dark:text-white opacity-70">
221221
<p className="text-center">
222-
<strong>Note:</strong> Uploaded papers are first reviewed by our team before appearing on the website. If your paper doesn't show up immediately, please be patient,it's likely still under review.
222+
<strong>Note:</strong> Uploaded papers are first reviewed by our team before appearing on the website. If your paper doesn&apos;t show up immediately, please be patient,it&apos;s likely still under review.
223223
</p>
224224
</div>
225225
</div>

src/components/FloatingNavbar.tsx

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ export default function FloatingNavbar({ onNavigate }: Props) {
4141
</DropdownMenuTrigger>
4242

4343
<DropdownMenuContent
44-
className="xl:hidden mt-2 w-72 space-y-1 rounded-3xl border border-white/10 bg-[#110F18] px-4 py-4 text-white shadow-xl backdrop-blur-sm pointer-events-auto"
44+
className="xl:hidden mt-2 py-2 w-72 space-y-1 rounded-3xl bg-[#4B22D1] text-white border border-[rgba(255,255,255,0.1)] shadow-2xl backdrop-blur-sm pointer-events-auto"
4545
align="end"
4646
>
4747
<DropdownMenuItem asChild>
4848
<Link
4949
href={pathname === "/upload" ? "/" : "/upload"}
5050
onClick={() => onNavigate()}
51-
className="flex w-full items-center gap-3 rounded-lg px-3 py-3 hover:bg-[#1A1823] transition"
51+
className="flex w-full items-center gap-3 rounded-lg px-3 py-1 hover:bg-[#1A1823] transition"
5252
>
5353
<UploadIcon className="h-4 w-4" />
5454
<span className="text-sm font-medium">
@@ -61,7 +61,7 @@ export default function FloatingNavbar({ onNavigate }: Props) {
6161
<Link
6262
href="/pinned"
6363
onClick={() => onNavigate()}
64-
className="flex w-full items-center gap-3 rounded-lg px-3 py-3 hover:bg-[#1A1823] transition"
64+
className="flex w-full items-center gap-3 rounded-lg px-3 py-1 hover:bg-[#1A1823] transition"
6565
>
6666
<Pin className="h-4 w-4" />
6767
<span className="text-sm font-medium">Pinned Subjects</span>
@@ -72,18 +72,15 @@ export default function FloatingNavbar({ onNavigate }: Props) {
7272
<Link
7373
href="/request"
7474
onClick={() => onNavigate()}
75-
className="flex w-full items-center gap-3 rounded-lg px-3 py-3 hover:bg-[#1A1823] transition"
75+
className="flex w-full items-center gap-3 rounded-lg px-3 py-1 hover:bg-[#1A1823] transition"
7676
>
7777
<ArrowUpRight className="h-4 w-4" />
7878
<span className="text-sm font-medium">Paper Request</span>
7979
</Link>
8080
</DropdownMenuItem>
81-
82-
<div className="pt-2 border-t border-[#3A3745] mt-2">
83-
<div className="flex justify-center pt-2">
84-
<div className="rounded-full border border-[#3A3745] p-1">
85-
<ModeToggle />
86-
</div>
81+
<div className="flex w-full items-center gap-3 rounded-lg px-3 py-1">
82+
<div className="border rounded-full">
83+
<ModeToggle />
8784
</div>
8885
</div>
8986
</DropdownMenuContent>

src/components/PinButton.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export default function PinButton({
1313
}) {
1414
return (
1515
<button
16+
type="submit"
1617
onClick={onToggle}
1718
className={`ml-2 flex items-center gap-2 rounded-full border border-[#3A3745] px-4 py-2 text-sm font-medium transition ${
1819
isPinned

src/components/Searchbar/pinned-searchbar.tsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ function PinnedSearchBar({
6060
setPinned(currentPinnedSubjects.includes(suggestion));
6161
}
6262

63+
setTimeout(() => {
64+
searchRef.current?.focus();
65+
}, 0);
66+
6367
setShowControls(true);
6468
setSuggestions([]);
6569
filtersNotPulled?.();
@@ -95,7 +99,7 @@ function PinnedSearchBar({
9599
const current = !pinned;
96100
setPinned(current);
97101

98-
if (searchText.trim() === "") {
102+
if (searchText.trim() === "" || !initialSubjects.includes(searchText.trim())) {
99103
return;
100104
}
101105

@@ -167,6 +171,9 @@ function PinnedSearchBar({
167171
<form
168172
onSubmit={(e) => {
169173
e.preventDefault();
174+
handlePinToggle();
175+
if(searchText.trim()!=="")
176+
setOpen(false);
170177
}}
171178
>
172179
<div className="flex items-center gap-2">
@@ -181,13 +188,9 @@ function PinnedSearchBar({
181188
suggestions.length > 0 ? "rounded-b-none" : ""
182189
}`}
183190
/>
184-
<button
185-
type="submit"
186-
className="absolute inset-y-0 right-3 flex items-center"
187-
title="Search"
188-
>
191+
<div className="absolute inset-y-0 right-3 flex items-center">
189192
<Search className="h-5 w-5 text-black dark:text-white" />
190-
</button>
193+
</div>
191194

192195
{suggestions.length > 0 && (
193196
<ul

src/components/screens/Faq.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ function Faq() {
8282
className={`flex h-6 w-8 shrink-0 items-center justify-center rounded-full text-base font-bold transition-all duration-200 sm:h-7 sm:w-9 sm:text-lg ${
8383
faqActive === index
8484
? "bg-[#A47DE5] text-white"
85-
: "bg-white text-[#99979F]"
85+
: "bg-black text-white"
8686
}`}
8787
>
8888
{faqActive === index ? "−" : "+"}

src/components/ui/switch.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const Switch = React.forwardRef<
2727
{props.checked ? (
2828
<Moon className="h-4 w-4 text-black" />
2929
) : (
30-
<Sun className="black h-4 w-4" />
30+
<Sun className="black h-4 w-4 text-black" />
3131
)}
3232
</SwitchPrimitives.Thumb>
3333
</SwitchPrimitives.Root>

0 commit comments

Comments
 (0)