diff --git a/.dockerignore b/.dockerignore index 5171c54..5538a11 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +1,6 @@ node_modules -npm-debug.log \ No newline at end of file +npm-debug.log +.git +.next +.git +docker diff --git a/components/SearchBox/SearchBox.tsx b/components/SearchBox/SearchBox.tsx index 73bf1ad..5cd3f89 100644 --- a/components/SearchBox/SearchBox.tsx +++ b/components/SearchBox/SearchBox.tsx @@ -15,9 +15,13 @@ interface SearchBoxProps { const SearchBox = ({ showExample = false }: SearchBoxProps) => { const router = useRouter() - const { q, t: tab = 'article' } = router.query + const { q } = router.query const [query, setQuery] = useState(q ? String(q) : ''); + // Default to 'page' tab for page related queries + const pageFilters = ['page', 'page_sequence', 'pagecolor', 'pagetype']; + const tab = String(query).split(' ').filter(s => pageFilters.includes(s.toLowerCase().split(':')[0])).length > 0? 'page' : 'article'; + const hrefSearch = { pathname: '/search', query: { q: query, page: 1, limit: 10, t: tab} } diff --git a/hooks/useVariant.ts b/hooks/useVariant.ts index 5229b0a..5a43429 100644 --- a/hooks/useVariant.ts +++ b/hooks/useVariant.ts @@ -1,5 +1,4 @@ function useVariant() { - console.log(process.env.NEXT_PUBLIC_VARIANT); return process.env.NEXT_PUBLIC_VARIANT === "SCIX" ? "SciX" : "ADS"; }