Skip to content

Commit 70c6079

Browse files
committed
fix: overflow
Signed-off-by: Innei <[email protected]>
1 parent dc5ed08 commit 70c6079

File tree

6 files changed

+20
-9
lines changed

6 files changed

+20
-9
lines changed

src/app/(dashboard)/dashboard.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*,
1313
*::before,
1414
*::after {
15-
--bc: rgb(92, 92, 92);
15+
--bc: rgb(60, 60, 60);
1616
}
1717
}
1818

src/app/(dashboard)/dashboard/comments/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export default function Page() {
5151

5252
const [tab, setTab] = useRouterQueryState('tab', TABS[0].key)
5353

54-
const currentTab = tab.toString()
54+
const currentTab = tab.toString() || TABS[0].key.toString()
5555
return (
5656
<div className="relative -mt-12 flex w-full flex-grow flex-col">
5757
<CommentSelectionKeysProvider>

src/components/layout/dashboard/Header.tsx

+10-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { useCallback } from 'react'
44
import { m } from 'framer-motion'
55
import { atom, useAtom, useSetAtom } from 'jotai'
66
import Link from 'next/link'
7-
import { usePathname } from 'next/navigation'
7+
import { usePathname, useRouter } from 'next/navigation'
88
import type { DashboardRoute } from '~/app/(dashboard)/routes'
99
import type { MouseEventHandler, ReactNode } from 'react'
1010

@@ -22,11 +22,19 @@ import { ThemeToggle } from './ThemeToggle'
2222

2323
export const LayoutHeader = () => {
2424
const title = useAggregationSelector((s) => s.seo.title)
25+
const router = useRouter()
2526
return (
2627
<header className="fixed left-0 right-0 top-0 z-[19] border-b-[0.5px] border-zinc-200 bg-white/80 pl-6 backdrop-blur dark:border-neutral-900 dark:bg-zinc-900/80">
2728
<nav className="flex h-16 items-center">
2829
<div className="flex items-center space-x-1 lg:space-x-3">
29-
<button className="p-2 text-2xl">𝕄</button>
30+
<MotionButtonBase
31+
onClick={() => {
32+
router.push('/dashboard')
33+
}}
34+
className="p-2 text-2xl"
35+
>
36+
𝕄
37+
</MotionButtonBase>
3038
<BreadcrumbDivider className="opacity-20" />
3139
<Link href="/" className="font-bold opacity-90 md:text-base">
3240
{title}

src/components/modules/dashboard/comments/CommentContentCell.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,15 @@ export const CommentContentCell: Component<{ comment: CommentModel }> = (
3535
return `${ref.text.slice(0, 20)}...`
3636
return (
3737
<MotionButtonBase
38+
className="inline-flex grow"
3839
onClick={async () => {
3940
const url = await apiClient.proxy.helper('url-builder')(ref.id).get<{
4041
data: string
4142
}>()
4243
window.open(url?.data, '_blank')
4344
}}
4445
>
45-
<EllipsisHorizontalTextWithTooltip wrapperClassName="text-accent inline-block !w-auto max-w-full">
46+
<EllipsisHorizontalTextWithTooltip wrapperClassName="text-left text-accent inline-block !w-0 flex-grow">
4647
{ref.title}
4748
</EllipsisHorizontalTextWithTooltip>
4849
</MotionButtonBase>

src/components/modules/dashboard/comments/CommentMobileList.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,16 @@ export const CommentMobileList = () => {
1919
</div>
2020
)
2121
}
22-
if (!isUndefined(data) && !data.pages.length) {
23-
return <Empty className="flex-grow" />
24-
}
2522

2623
const totalLength =
2724
data?.pages.reduce((acc, page) => {
2825
return acc + page.data.length
2926
}, 0) || 0
3027

28+
if (totalLength === 0) {
29+
return <Empty className="flex-grow" />
30+
}
31+
3132
return (
3233
<OffsetMainLayout className="relative mt-4">
3334
{isLoading && <AbsoluteCenterSpinner />}

src/components/modules/dashboard/home/Version.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const Version = () => {
77
const { data: version, isLoading } = useQuery({
88
queryKey: ['version'],
99
queryFn: () => {
10-
return apiClient.proxy.get<AppInfo>()
10+
return apiClient.proxy.info.get<AppInfo>()
1111
},
1212
refetchInterval: 1000 * 60 * 60 * 24,
1313
})
@@ -18,6 +18,7 @@ export const Version = () => {
1818
</div>
1919
)
2020

21+
console.log(version, 'a')
2122
return (
2223
<div className="opacity-60">
2324
<p className="text-center">

0 commit comments

Comments
 (0)