Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
node_modules
npm-debug.log
npm-debug.log
.git
.next
.git
docker
6 changes: 5 additions & 1 deletion components/SearchBox/SearchBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>(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} }


Expand Down
1 change: 0 additions & 1 deletion hooks/useVariant.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
function useVariant() {
console.log(process.env.NEXT_PUBLIC_VARIANT);
return process.env.NEXT_PUBLIC_VARIANT === "SCIX" ? "SciX" : "ADS";
}

Expand Down