Skip to content

Commit

Permalink
minor improvements and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nesaku committed Aug 3, 2023
1 parent 3e062d5 commit 0d715d8
Show file tree
Hide file tree
Showing 10 changed files with 176 additions and 125 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.15.4] - Aug 3, 2023

### Changed

- Update the instances list in the README and instances.json
- Update the default contact form success redirect URL

### Fixed

- Fix the similar books section being blank
- Fix no edition results being shown

## [2.15.3] - Jul 24, 2023

### Added
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Inspired by [Nitter](https://github.com/zedeus/nitter), [libremdb](https://githu
| Instance URL | Country | Provider | Notes |
| --------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------: | ---------- | --------------------------------------------------------- |
| [biblioreads.eu.org](https://biblioreads.eu.org) | :us: | Netlify | Run by [me](https://github.com/nesaku) |
| [biblioreads.ml](https://biblioreads.ml) | :us: | Vercel | Run by [me](https://github.com/nesaku) |
| [biblioreads.vercel.app](https://biblioreads.vercel.app) | :us: | Vercel | Run by [me](https://github.com/nesaku) |
| [biblioreads.mooo.com](https://biblioreads.mooo.com) | :globe_with_meridians: | Cloudflare | Run by [me](https://github.com/nesaku) |
| [bl.vern.cc](https://bl.vern.cc) | :us: | Hetzner | Run by [~vern](https://vern.cc) |
| [biblioreads.lunar.icu](https://biblioreads.lunar.icu) | :globe_with_meridians: | Cloudflare | Run by [Lunar.ICU](https://lunar.icu) |
Expand Down
2 changes: 1 addition & 1 deletion components/contactpage/ContactForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const ContactForm = () => {
value={
process.env.NEXT_PUBLIC_HOST_URL
? `${process.env.NEXT_PUBLIC_HOST_URL}/success`
: "https://biblioreads.ml/success"
: "https://biblioreads.eu.org/success"
}
/>
<input type="hidden" name="_error" value="/500" />
Expand Down
4 changes: 2 additions & 2 deletions components/global/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React from "react";
import Link from "next/link";

const Footer = () => {
const version = "v2.15.3";
const versionSlug = "2153---jul-24-2023";
const version = "v2.15.4";
const versionSlug = "2154---aug-3-2023";

console.log(`%c${version} (Oreki)`, `color:green`);

Expand Down
12 changes: 6 additions & 6 deletions components/resultpage/ResultData.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@ const ResultData = ({ scrapedData }) => {
{scrapedData.bookEdition}
</span>
<Link
href={scrapedData.workURL.replace(
"https://www.goodreads.com/work/",
href={scrapedData.quotesURL.replace(
"https://www.goodreads.com/work/quotes/",
"/work/editions/"
)}
>
Expand Down Expand Up @@ -355,8 +355,8 @@ const ResultData = ({ scrapedData }) => {
<ReviewBreakdown data={scrapedData} />
)}
<div className="block lg:hidden">
{scrapedData.workURL != "" && (
<SimilarBooks workURL={scrapedData.workURL} mobile={true} />
{scrapedData.quotesURL != "" && (
<SimilarBooks quotesURL={scrapedData.quotesURL} mobile={true} />
)}
{scrapedData.reviews != "" && (
<ReviewsMobile data={scrapedData.reviews} />
Expand All @@ -367,8 +367,8 @@ const ResultData = ({ scrapedData }) => {
)}
{scrapedData.title && (
<div className="hidden lg:block ml-[14vw] mr-[2vw] 2xl:ml-[16vw] 2xl:mr-[vw] mt-2">
{scrapedData.workURL != "" && (
<SimilarBooks workURL={scrapedData.workURL} mobile={false} />
{scrapedData.quotesURL != "" && (
<SimilarBooks quotesURL={scrapedData.quotesURL} mobile={false} />
)}
{scrapedData.reviews != "" && <Reviews data={scrapedData.reviews} />}
</div>
Expand Down
4 changes: 2 additions & 2 deletions components/resultpage/SimilarBooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useEffect, useState } from "react";
import SmallLoader from "../global/SmallLoader";

// Instead of waiting for the similar books section to be lazy loaded, get the results directly from the Goodreads similar books page
const SimilarBooks = ({ workURL, mobile }) => {
const SimilarBooks = ({ quotesURL, mobile }) => {
const [scrapedData, setScrapedData] = useState({});
const [isLoading, setIsLoading] = useState(false);
const [error, setError] = useState(false);
Expand All @@ -17,7 +17,7 @@ const SimilarBooks = ({ workURL, mobile }) => {
"content-type": "application/json",
},
body: JSON.stringify({
queryURL: `${workURL.replace("/work/", "/book/similar/")}`,
queryURL: `${quotesURL.replace("/work/quotes/", "/book/similar/")}`,
}),
});
if (res.ok) {
Expand Down
2 changes: 1 addition & 1 deletion instances.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"cloudflare": false
},
{
"url": "https://biblioreads.ml",
"url": "https://biblioreads.vercel.app",
"countries": ["us"],
"cloudflare": false
},
Expand Down
Loading

0 comments on commit 0d715d8

Please sign in to comment.