Skip to content

Commit 5c0aee3

Browse files
committed
update
1 parent e5c2075 commit 5c0aee3

File tree

5 files changed

+38
-28
lines changed

5 files changed

+38
-28
lines changed

apps/web/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"react-image-crop": "^11.0.10",
3939
"sonner": "^2.0.7",
4040
"tailwind-merge": "^3.4.0",
41+
"tailwind-scrollbar-hide": "^4.0.0",
4142
"tw-animate-css": "^1.4.0",
4243
"zod": "^4.1.12"
4344
},

apps/web/src/app/api/data/public_data/route.ts

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -41,28 +41,10 @@ export const GET = async (request: NextRequest) => {
4141
});
4242
}
4343
} else {
44-
if (filter === null) {
45-
const filter2 = JSON.parse(JSON.stringify(filter));
46-
if (filter2.by === "tag") {
47-
query = dorm.and(
48-
dorm.eq(main_schema.userPosts.status, "public"),
49-
dorm.and(
50-
dorm.eq(main_schema.userPosts.byUser, pullFromUserId),
51-
dorm.inArray(main_schema.userPosts.tags, filter2.filter),
52-
),
53-
);
54-
} else {
55-
query = dorm.and(
56-
dorm.eq(main_schema.userPosts.status, "public"),
57-
dorm.eq(main_schema.userPosts.byUser, pullFromUserId),
58-
);
59-
}
60-
} else {
61-
query = dorm.and(
62-
dorm.eq(main_schema.userPosts.status, "public"),
63-
dorm.eq(main_schema.userPosts.byUser, pullFromUserId),
64-
);
65-
}
44+
query = dorm.and(
45+
dorm.eq(main_schema.userPosts.status, "public"),
46+
dorm.eq(main_schema.userPosts.byUser, pullFromUserId),
47+
);
6648
}
6749
const dbResult = await db
6850
.select()

apps/web/src/app/dashboard/sidebar.tsx

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ import {
44
LogOutIcon,
55
PanelTopIcon,
66
PlusCircleIcon,
7-
SquareChartGantt,
87
UsersIcon,
98
Sun,
109
Moon,
1110
SettingsIcon,
1211
InfoIcon,
12+
CircleArrowLeftIcon,
1313
} from "lucide-react";
1414
import { Button } from "@/components/ui/button";
1515
import Image from "next/image";
@@ -94,9 +94,9 @@ export default function DashboardSidebar({
9494
};
9595

9696
return (
97-
<Sidebar className="border-r">
98-
<SidebarHeader className="border-b p-4">
99-
<div className="flex flex-row justify-between">
97+
<Sidebar className="border-r scrollbar-hide overflow-y-hidden overscroll-y-none no-scrollbar">
98+
<SidebarHeader className="border-b p-4 scrollbar-hide overflow-y-hidden overscroll-y-none no-scrollbar">
99+
<div className="flex flex-row justify-between scrollbar-hide">
100100
<div className="flex items-center gap-3">
101101
<div className="h-8 w-8 bg-primary rounded-full flex items-center justify-center">
102102
<Image
@@ -118,7 +118,7 @@ export default function DashboardSidebar({
118118
</div>
119119
</SidebarHeader>
120120

121-
<SidebarContent className="flex flex-col">
121+
<SidebarContent className="flex flex-col overflow-y-hidden overscroll-y-none no-scrollbar">
122122
<SidebarGroup>
123123
<SidebarGroupLabel></SidebarGroupLabel>
124124
<SidebarGroupContent>
@@ -159,7 +159,18 @@ export default function DashboardSidebar({
159159
</SidebarContent>
160160

161161
<SidebarFooter>
162-
<SidebarMenu>
162+
<SidebarMenu className="space-y-1">
163+
<SidebarMenuItem>
164+
<Link href="/">
165+
<Button
166+
variant="outline"
167+
className="w-full justify-start hover:text-outline hover:bg-outline/10 cursor-pointer"
168+
>
169+
<CircleArrowLeftIcon className="h-4 w-4" />
170+
<span>Back Home</span>
171+
</Button>
172+
</Link>
173+
</SidebarMenuItem>
163174
<SidebarMenuItem>
164175
<Button
165176
variant="outline"

apps/web/src/index.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
@import "tailwindcss";
22
@import "tw-animate-css";
3+
@import "tailwind-scrollbar-hide/v4";
34

45
@custom-variant dark (&:where(.dark, .dark *));
56

@@ -155,3 +156,15 @@ body {
155156
@apply bg-background text-foreground;
156157
}
157158
}
159+
160+
@layer utilities {
161+
/* Hide scrollbar for Chrome, Safari, and Opera */
162+
.no-scrollbar::-webkit-scrollbar {
163+
display: none;
164+
}
165+
/* Hide scrollbar for IE, Edge, and Firefox */
166+
.no-scrollbar {
167+
-ms-overflow-style: none; /* IE and Edge */
168+
scrollbar-width: none; /* Firefox */
169+
}
170+
}

bun.lock

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)