mirror of
https://github.com/linsa-io/linsa.git
synced 2026-04-27 10:47:14 +02:00
* feat: add jazz globa group cons * chore: remove topic selector atom * chore: use jazz from constant * chore: remove delete model and add new topic selector * chore: use jazz group id form constant in search component * chore: use jazz group id form constant in public home route * fix: topic selector in link * fix: topic section in detail topic * chore: update la editor * chore: content header tweak class * chore: add btn variant to topic selector * refactor: tweak border for link header * chore: page header * fix: page detail route
35 lines
902 B
TypeScript
35 lines
902 B
TypeScript
"use client"
|
|
|
|
import * as React from "react"
|
|
import { ContentHeader, SidebarToggleButton } from "@/components/custom/content-header"
|
|
import { PersonalPage } from "@/lib/schema/personal-page"
|
|
import { useMedia } from "react-use"
|
|
import { TopicSelector } from "@/components/custom/topic-selector"
|
|
|
|
export const DetailPageHeader = ({ page }: { page: PersonalPage }) => {
|
|
const isMobile = useMedia("(max-width: 770px)")
|
|
|
|
return (
|
|
isMobile && (
|
|
<>
|
|
<ContentHeader className="lg:min-h-0">
|
|
<div className="flex min-w-0 gap-2">
|
|
<SidebarToggleButton />
|
|
</div>
|
|
</ContentHeader>
|
|
|
|
<div className="flex flex-row items-start justify-between border-b px-6 py-2 max-lg:pl-4">
|
|
<TopicSelector
|
|
value={page.topic?.name}
|
|
onTopicChange={topic => {
|
|
page.topic = topic
|
|
page.updatedAt = new Date()
|
|
}}
|
|
align="start"
|
|
/>
|
|
</div>
|
|
</>
|
|
)
|
|
)
|
|
}
|