@fortawesome/free-solid-svg-icons#faBookmark JavaScript Examples

The following examples show how to use @fortawesome/free-solid-svg-icons#faBookmark. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: _app.jsx    From teach-yourself-code with MIT License 6 votes vote down vote up
library.add(
  faHome,
  faInfoCircle,
  faUser,
  faYoutube,
  faBookmark,
  faSignOutAlt,
  faCaretDown,
  faArrowAltCircleLeft,
  faArrowAltCircleRight,
  faAtom,
  faMap
);
Example #2
Source File: favourites.page.jsx    From courseyard with MIT License 5 votes vote down vote up
function FavouritesPage() {
  const [courses, setCourses] = useState([]);
  const { user } = useContext(UserContext);
  const history = useHistory();

  useEffect(() => {
    document.title = "Courseyard | Favourites";
    if (user.uid) {
      axios
        .get("/favourites/getall")
        .then((res) => {
          setCourses(res.data.favourites);
        })
        .catch((err) => {
          console.error(err);
        });
    } else {
      history.push("/signin");
    }
  }, [user]);

  const NoCourses = () => {
    return (
      <div className="mr-auto ml-auto text-center p-5 w-full lg:w-1/2 md:w-1/2 pb-16">
        <h1 className="text-primary font-display text-3xl font-semibold">
          {" "}
          <FontAwesomeIcon icon={faBookmark} /> Seems like you have no Favourite Courses.
        </h1>
        <h2 className="text-secondary font-display text-lg mt-3">
          Click the <FontAwesomeIcon icon={faStar} /> icon below the courses to set one as your
          favourite.
        </h2>
      </div>
    );
  };

  return (
    <div className="bg-accent">
      <h1 className="title-fav mb-10 text-center text-5xl lg:text-6xl md:text-5xl font-bold font-display text-primary">
        Favourites
      </h1>
      {courses.length !== 0 ? <CoursePreview courses={courses} /> : <NoCourses />}
    </div>
  );
}