Skip to content

Commit

Permalink
Now you cannot find the same business again without going through all…
Browse files Browse the repository at this point in the history
… other businesses for that search to prevent repeating
  • Loading branch information
puremana committed May 11, 2021
1 parent 87a6c2a commit 1bb4208
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
18 changes: 10 additions & 8 deletions .firebase/hosting.ZGlzdA.cache
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
index.html,1606675193952,b92622afcf8cdfa9a8ec750b0eb17aad3f05a809063452c29c68ce40e92a4074
favicon.png,1606675193952,77732ebb7e7c4a2120ff86de96299955f08027c3324897233f00006a741d9f06
css/app.25201aba.css,1606675193952,d7d13d146140a4658ef2605126a5daa267a6f3ea80cf4e7679a1a4f172325167
img/yelp-logo.9ea57640.png,1606675193952,f31ac92b0cd317a7bc6cc4f3b49f865e94efcf3ec2f9643d6c82626252fc4a23
js/app.4bda016c.js,1606675193952,984d38b01b5827961bb3f6256bf06a0666226fe06c8242a04b172c88387222a5
js/app.4bda016c.js.map,1606675193960,4d77126a0571b36dfe56e939a64d944abc5a76cc28ce9461e3d3a2350bc5d4fb
js/chunk-vendors.ed7c120d.js,1606675193960,70554df9e80db7385c3e56de00fd1b648a619f60c1079006bfd54e417460d6eb
js/chunk-vendors.ed7c120d.js.map,1606675193960,9eee82fea0246ef46c3b86db76ac579ef6ee140e503d44f559df9ce35c7e7b87
favicon.png,1620773261927,77732ebb7e7c4a2120ff86de96299955f08027c3324897233f00006a741d9f06
index.html,1620773261927,b35590b5f39b2cef2f3e041bfe79445a99f5b1a19b574509dcd97d1b7723f947
css/app.790f6b3d.css,1620773261927,f22a09ca6c4e89c7f80b0934aae604b74af9dd9cc04e5c13d5540b864b28b3c2
js/app.d09e5b7d.js,1620773261927,7edb4cb027a9ec37c89a342712d3eb18480700a7da447766994e8fdb334cfa89
img/yelp-logo.9ea57640.png,1620773261927,f31ac92b0cd317a7bc6cc4f3b49f865e94efcf3ec2f9643d6c82626252fc4a23
background.jpg,1620773261927,f1283f6129a742f59a1918339c584e1cc5d7e7a8195e4b042cbb073444c33b2e
js/app.d09e5b7d.js.map,1620773261935,be6db77871e06965d700016dc41b7e5c021aaab064225cf8c4039f5322d68bf9
background_raw.jpg,1620773261927,9920aa50362c7984007336685e7ee1cd282c73b0a2e8c9eb73bdafa43e6a079e
js/chunk-vendors.5d28cb9c.js,1620773261935,f68a7e2656b3e0ccaecf4b6bcc7937e3ec28edbab490ccd0e3b88c1d4f8992d4
js/chunk-vendors.5d28cb9c.js.map,1620773261935,4e4928895f7379b66fcd25ae0cfdcfa2ee033ed218d70f1be458e5fa0a077a31
12 changes: 10 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ export default {
searchValue: "",
changed: false,
searches: 0,
rawfilteredBusinesses: [],
filteredBusinesses: []
}
},
Expand Down Expand Up @@ -255,7 +256,10 @@ export default {
return;
}
if (!this.changed && this.searches > 0 && this.filteredBusinesses.length > 0) {
if (!this.changed && this.searches > 0 && this.rawfilteredBusinesses.length > 0) {
if (this.filteredBusinesses.length === 0) {
this.filteredBusinesses = this.rawfilteredBusinesses.slice();
}
this.filterBusinesses(this.filteredBusinesses);
return;
}
Expand Down Expand Up @@ -287,7 +291,8 @@ export default {
}
else {
let realData = self.filterData(response.data);
self.filteredBusinesses = realData;
self.rawfilteredBusinesses = realData;
self.filteredBusinesses = [];
if (realData.length === 0) {
self.error = "No open businesses were found matching your options, try increasing your radius!";
}
Expand Down Expand Up @@ -332,6 +337,8 @@ export default {
}
}
data.splice(ran, 1);
this.name = b["name"];
this.link = b["url"];
this.rating = b["rating"].toFixed(1);
Expand Down Expand Up @@ -464,6 +471,7 @@ body {
text-align: center;
min-height: 360px;
position: relative;
user-select: none;
h2 {
margin: 20px 0 0 0;
Expand Down

0 comments on commit 1bb4208

Please sign in to comment.