From 620ba5f76913159a8afd568904f21ce3c3165ceb Mon Sep 17 00:00:00 2001
From: AkiraFukushima
Date: Tue, 2 Jul 2024 22:32:04 +0900
Subject: [PATCH] refs #4792 Show detail in search results
---
renderer/components/timelines/Search.tsx | 13 +++++++++++--
renderer/components/timelines/search/Hashtags.tsx | 2 +-
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/renderer/components/timelines/Search.tsx b/renderer/components/timelines/Search.tsx
index f290e72b6b..968bea9580 100644
--- a/renderer/components/timelines/Search.tsx
+++ b/renderer/components/timelines/Search.tsx
@@ -8,6 +8,7 @@ import Statuses from './search/Statuses'
import { Account } from '@/db'
import Accounts from './search/Accounts'
import Hashtags from './search/Hashtags'
+import Detail from '../detail/Detail'
type Props = {
client: MegalodonInterface
@@ -65,10 +66,17 @@ export default function Search(props: Props) {
}
}
+ const timelineClass = () => {
+ if (router.query.detail) {
+ return 'timeline-with-drawer'
+ }
+ return 'timeline'
+ }
+
return (
<>
-
-
+
+
>
)
diff --git a/renderer/components/timelines/search/Hashtags.tsx b/renderer/components/timelines/search/Hashtags.tsx
index b1d87ab634..c8e57f6c93 100644
--- a/renderer/components/timelines/search/Hashtags.tsx
+++ b/renderer/components/timelines/search/Hashtags.tsx
@@ -12,7 +12,7 @@ export default function Hashtags(props: Props) {
const router = useRouter()
const openTag = (tag: string) => {
- router.push({ query: { id: router.query.id, timeline: router.query.timeline, hashtag: tag, detail: true } })
+ router.push({ query: { id: router.query.id, timeline: router.query.timeline, tag: tag, detail: true } })
}
return (