Skip to content

Commit

Permalink
fix: overflow
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <i@innei.in>
  • Loading branch information
Innei committed Jan 8, 2024
1 parent dc5ed08 commit 70c6079
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/app/(dashboard)/dashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*,
*::before,
*::after {
--bc: rgb(92, 92, 92);
--bc: rgb(60, 60, 60);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/(dashboard)/dashboard/comments/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default function Page() {

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

const currentTab = tab.toString()
const currentTab = tab.toString() || TABS[0].key.toString()
return (
<div className="relative -mt-12 flex w-full flex-grow flex-col">
<CommentSelectionKeysProvider>
Expand Down
12 changes: 10 additions & 2 deletions src/components/layout/dashboard/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useCallback } from 'react'
import { m } from 'framer-motion'
import { atom, useAtom, useSetAtom } from 'jotai'
import Link from 'next/link'
import { usePathname } from 'next/navigation'
import { usePathname, useRouter } from 'next/navigation'
import type { DashboardRoute } from '~/app/(dashboard)/routes'
import type { MouseEventHandler, ReactNode } from 'react'

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

export const LayoutHeader = () => {
const title = useAggregationSelector((s) => s.seo.title)
const router = useRouter()
return (
<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">
<nav className="flex h-16 items-center">
<div className="flex items-center space-x-1 lg:space-x-3">
<button className="p-2 text-2xl">𝕄</button>
<MotionButtonBase
onClick={() => {
router.push('/dashboard')
}}
className="p-2 text-2xl"
>
𝕄
</MotionButtonBase>
<BreadcrumbDivider className="opacity-20" />
<Link href="/" className="font-bold opacity-90 md:text-base">
{title}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,15 @@ export const CommentContentCell: Component<{ comment: CommentModel }> = (
return `${ref.text.slice(0, 20)}...`
return (
<MotionButtonBase
className="inline-flex grow"
onClick={async () => {
const url = await apiClient.proxy.helper('url-builder')(ref.id).get<{
data: string
}>()
window.open(url?.data, '_blank')
}}
>
<EllipsisHorizontalTextWithTooltip wrapperClassName="text-accent inline-block !w-auto max-w-full">
<EllipsisHorizontalTextWithTooltip wrapperClassName="text-left text-accent inline-block !w-0 flex-grow">
{ref.title}
</EllipsisHorizontalTextWithTooltip>
</MotionButtonBase>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@ export const CommentMobileList = () => {
</div>
)
}
if (!isUndefined(data) && !data.pages.length) {
return <Empty className="flex-grow" />
}

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

if (totalLength === 0) {
return <Empty className="flex-grow" />
}

return (
<OffsetMainLayout className="relative mt-4">
{isLoading && <AbsoluteCenterSpinner />}
Expand Down
3 changes: 2 additions & 1 deletion src/components/modules/dashboard/home/Version.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const Version = () => {
const { data: version, isLoading } = useQuery({
queryKey: ['version'],
queryFn: () => {
return apiClient.proxy.get<AppInfo>()
return apiClient.proxy.info.get<AppInfo>()
},
refetchInterval: 1000 * 60 * 60 * 24,
})
Expand All @@ -18,6 +18,7 @@ export const Version = () => {
</div>
)

console.log(version, 'a')
return (
<div className="opacity-60">
<p className="text-center">
Expand Down

1 comment on commit 70c6079

@vercel
Copy link

@vercel vercel bot commented on 70c6079 Jan 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

shiro – ./

shiro-git-main-innei.vercel.app
shiro-innei.vercel.app
springtide.vercel.app
innei.in

Please sign in to comment.