Skip to content

Commit

Permalink
Chore: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwanthkumar-avalara committed Jul 6, 2020
1 parent c8d3a21 commit 01b3a56
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 30 deletions.
28 changes: 1 addition & 27 deletions frontend/SearchResultsView.tsx
Expand Up @@ -16,7 +16,6 @@ import { thumbnailUrlFor, FIXED_THUMBNAIL_WIDTH, FIXED_THUMBNAIL_HEIGHT } from '
export function SearchResultsView({ appState, setAppState }) {
const [items, setItems] = useState(appState.state.selection || []);
const viewport = useViewport();
console.log(appState);

const topbarStyle: CSS.Properties = {
position: 'fixed',
Expand All @@ -36,7 +35,7 @@ export function SearchResultsView({ appState, setAppState }) {

const toggleSelection = (pic) => () => {
if (isPicSelected(pic)) {
setItems(items.filter(function (p) { return p.id !== pic.id; }))
setItems(items.filter(function (p) { return p.id !== pic.id; }));
} else {
setItems(items.concat([pic]));
}
Expand All @@ -48,31 +47,6 @@ export function SearchResultsView({ appState, setAppState }) {
setAppState(updatedAppState);
}

// window.onscroll = debounce(() => {
// const {
// loadUsers,
// state: {
// error,
// isLoading,
// hasMore,
// },
// } = this;

// // Bails early if:
// // * there's an error
// // * it's already loading
// // * there's nothing left to load
// if (error || isLoading || !hasMore) return;

// // Checks that the page has scrolled to the bottom
// if (
// window.innerHeight + document.documentElement.scrollTop
// === document.documentElement.offsetHeight
// ) {
// loadUsers();
// }
// }, 100);

const reviewItems = () => {
const updatedAppState = { ...appState };
updatedAppState.index = 3;
Expand Down
3 changes: 0 additions & 3 deletions frontend/Welcome.tsx
Expand Up @@ -13,8 +13,6 @@ import {
} from '@airtable/blocks/ui';
import React, { useState, useEffect } from 'react';
import { BING_API_KEY } from './settings';
import { ImageSearchClient, ImageSearchModels } from '@azure/cognitiveservices-imagesearch'
import { CognitiveServicesCredentials } from './CognitiveServicesCredentials'
import { BingSearchClient } from './BingSearchClient'

export function Welcome({ appState, setAppState, setIsSettingsVisible }) {
Expand All @@ -33,7 +31,6 @@ export function Welcome({ appState, setAppState, setIsSettingsVisible }) {
const bingClient = new BingSearchClient(apiKey);
bingClient.search("cats")
.then(function (res) {
console.log(res);
setLoading(false);
setErrorMessage("");

Expand Down

0 comments on commit 01b3a56

Please sign in to comment.