Skip to content
This repository has been archived by the owner on Jul 29, 2022. It is now read-only.

Commit

Permalink
Very little happened today
Browse files Browse the repository at this point in the history
  • Loading branch information
phocks committed Feb 29, 2020
1 parent a7db398 commit e48f656
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
3 changes: 2 additions & 1 deletion lib/mongodb.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export const findHome = async (
return result;
};

// TODO: Switch to Atlas Search
export const search = async (
collectionName,
query,
Expand All @@ -76,7 +77,7 @@ export const search = async (
.find(query, { score: { $meta: "textScore" } })
.limit(options.limit)
.skip(options.skip)
.sort({ date: -1 })
// .sort({ date: -1 })
.toArray();

return result;
Expand Down
14 changes: 2 additions & 12 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,9 @@ const Home = props => {
return (
<Layout title="Quoke">
<div className="col">
{quotes.map((quote, index) => {
return <Quote quote={quote} key={index} isLinked={true} />;
{quotes.map((quote, iteration) => {
return <Quote quote={quote} key={iteration} isLinked={true} />;
})}

{/* <Quote
quote={{
text: "Somewhere, something incredible is waiting to be known.",
author: "Carl Sagan",
source: "Cosmos",
date: "2020-02-18",
topics: ["Knowledge", "Space"]
}}
/> */}
</div>
</Layout>
);
Expand Down

1 comment on commit e48f656

@vercel
Copy link

@vercel vercel bot commented on e48f656 Feb 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.