Skip to content

Commit

Permalink
remove console logs and unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
lperry25 committed Nov 22, 2024
1 parent 1338987 commit 8fabb14
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
13 changes: 0 additions & 13 deletions src/App/libs/provider/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ export function createStore(set) {
};
}

function toggleOption(allOptions, current, item) {
return allOptions
.map(({ id }) => id)
.filter((id) => (id === item) !== current.includes(id));
}

function setFilters(state, filters) {
return Object.entries(filters).reduce((result, [key, value]) => {
switch (key) {
Expand Down Expand Up @@ -58,13 +52,6 @@ function toggleNamespace(state, namespace) {
);
}
return setNamespaces(state, [namespace]);
let namespaces = toggleOption(ALL_NAMESPACES, state.namespaces, namespace);
console.log({ namespaces });
if (namespaces.length === 0)
namespaces = ALL_NAMESPACES.map(({ id }) => id).filter(
(id) => id !== namespace,
);
return setNamespaces(state, namespaces);
}

function summaryAppend(state, summary) {
Expand Down
3 changes: 0 additions & 3 deletions src/App/pages/search/search-sources.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ function Source({ id, icon, name, selectedTab }) {
const tabRef = useRef(null);

useEffect(() => {
console.log({ selectedTab, id });
if (selectedTab === id) {
console.log('scroll');
tabRef?.current?.scrollIntoView({
behavior: 'smooth',
block: 'center',
Expand All @@ -35,7 +33,6 @@ function Source({ id, icon, name, selectedTab }) {
export function SearchSources() {
const location = useLocation();
const { namespaces } = parseUrlParams(location.search);
console.log({ namespaces });
const defaultValue = namespaces?.length === 1 ? namespaces[0] : 'all';
return (
<ScrollArea h="40">
Expand Down

0 comments on commit 8fabb14

Please sign in to comment.