From e9a9f82652817e761b48fdc4a6c26fb67d95ec89 Mon Sep 17 00:00:00 2001 From: sajjad isvand Date: Sat, 3 Jan 2026 04:43:52 +0330 Subject: [PATCH 1/2] feat: add support for link types and layout adjustments in ExplorerContent and content fetching --- src/layouts/explorer/explorer.tsx | 189 +++++++++++++----- .../hooks/content/get-content.hook.ts | 19 +- 2 files changed, 156 insertions(+), 52 deletions(-) diff --git a/src/layouts/explorer/explorer.tsx b/src/layouts/explorer/explorer.tsx index 5e1941cb..36f36571 100644 --- a/src/layouts/explorer/explorer.tsx +++ b/src/layouts/explorer/explorer.tsx @@ -2,13 +2,21 @@ import { useGetContents } from '@/services/hooks/content/get-content.hook' import { useRef, useState, useEffect } from 'react' import Analytics from '@/analytics' import { getFaviconFromUrl } from '@/common/utils/icon' +import { useTheme } from '@/context/theme.context' +import { useAppearanceSetting } from '@/context/appearance.context' interface LinkItem { name: string url: string + type?: 'SITE' | 'REMOTE_IFRAME' icon?: string badge?: string badgeColor?: string + span?: { + col?: number | null + row?: number | null + } + height?: number } interface CategoryItem { @@ -17,9 +25,14 @@ interface CategoryItem { banner?: string links: LinkItem[] icon?: string + span?: { + col?: number | null + row?: number | null + } } - export function ExplorerContent() { + const { theme } = useTheme() + const { fontFamily } = useAppearanceSetting() const { data: catalogData } = useGetContents() const [activeCategory, setActiveCategory] = useState(null) const categoryRefs = useRef<{ [key: string]: HTMLDivElement | null }>({}) @@ -66,16 +79,16 @@ export function ExplorerContent() { return (
-