summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMqdd <ahmadmiqdad27@gmail.com>2025-12-19 15:15:28 +0700
committerMqdd <ahmadmiqdad27@gmail.com>2025-12-19 15:15:28 +0700
commit89978029f6f97bd1bb4390a3e3c2edf073e115c9 (patch)
tree5386f729ea88474b31c6324a895d0d7b1de4d189 /src
parentaa31de678b152aabeb5c4ac19e3d63bfe7f785f5 (diff)
<Miqdad> fix title
Diffstat (limited to 'src')
-rw-r--r--src/pages/searchkey/[slug].jsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pages/searchkey/[slug].jsx b/src/pages/searchkey/[slug].jsx
index 4a6923ff..a23f11b0 100644
--- a/src/pages/searchkey/[slug].jsx
+++ b/src/pages/searchkey/[slug].jsx
@@ -23,7 +23,11 @@ export default function FindPage() {
const [categoryId, setCategoryId] = useState(null);
const slugRaw = route.query.slug || null;
- const readableSlug = capitalizeEachWord(slugRaw);
+ const readableSlug = slugRaw
+ ? decodeURIComponent(slugRaw)
+ .replace(/-/g, ' ')
+ .replace(/\b\w/g, (c) => c.toUpperCase())
+ : '';
// 🔹 Fetch searchkey dari Solr
const getSearchKeyData = async (slug) => {