Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Commit

Permalink
fix: popular icon search (#9845)
Browse files Browse the repository at this point in the history
  • Loading branch information
eddiejaoude authored Nov 27, 2023
1 parent 3763c7e commit 0e0e1af
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pages/icons.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useMemo, useState } from "react";
import * as FaIcons from "react-icons/fa6";
import * as SiIcons from "react-icons/si";

import Input from "@components/form/Input";
import Alert from "@components/Alert";
import IconCard from "@components/IconCard";
Expand All @@ -11,9 +12,17 @@ import { useRouter } from "next/router";
import Button from "@components/Button";
import { getPopularIcons } from "./api/icons";
import Badge from "@components/Badge";
import logger from "@config/logger";

export async function getServerSideProps() {
const popularIcons = await getPopularIcons();
let popularIcons = [];

try {
popularIcons = await getPopularIcons();
} catch (e) {
logger.error(e, "Failed to load popular icons");
}

return {
props: { popularIcons },
};
Expand Down

0 comments on commit 0e0e1af

Please sign in to comment.