Re:Show HN: I made a site where you practice typing by retyp...
by Octouroboros on Tuesday October 06, 2020 @09:19AM
(#24697361)
Hey I'm glad you asked! It's the way Nextjs handles urls with more than 1 param. If I prettify the URL then for some reason the page can't access them. Don't know if they've improved on it yet (or, who knows, maybe I'm just using it wrong) but it'll be fixed eventually.
Re:Show HN: I made a site where you practice typing by retyp...
by SamBam on Tuesday October 06, 2020 @09:25AM
(#24697404)
The URL parameters are:
{"bookTitle": "The Call of Cthulhu", "displayTitle": "The Call of Cthulhu", "language": "English", "bookId": "5f468ca35e91c10be0883a57"}
Why do you need all the others besides "bookId"?
Changing "bookTitle" and "language" don't seem to do anything. Changing "displayTitle" does change the displayed title, but why can't you get that using the bookId?
Re:Show HN: I made a site where you practice typing by retyp...
by john_miller on Tuesday October 06, 2020 @10:17AM
(#24697864)
// call /MyPage?par1=hello&par2=42
const MyPage = (props: { query: { par1: string; par2: number } }) => ( <div>{`${props.query.par1}-${props.query.par2}`}</div> );
Re:Show HN: I made a site where you practice typing by retyp...
by Minor49er on Tuesday October 06, 2020 @09:35AM
(#24697489)
That's interesting. Thanks for pointing me towards Next.js. I wasn't aware of that framework, but I'm checking it out.
Re:Show HN: I made a site where you practice typing by retyp...
by technoplato on Tuesday October 06, 2020 @09:41AM
(#24697554)
Super cool framework that is only getting better. If you’re interested in framework spelunking-check out Remix by Ryan Florence and Michael Jackson (no, not that one...). It’s actually going to be paid but I’m very excited to try it. It handles some data loading pain points among others that seem very interesting.
Re:Show HN: I made a site where you practice typing by retyp...
by roryokane on Tuesday October 06, 2020 @03:34PM
(#24701488)
Link to the mentioned framework “Remix”: https://remix.run/
Re:Show HN: I made a site where you practice typing by retyp...
by cambalache on Tuesday October 06, 2020 @08:14PM
(#24703974)
That is just an email collecting form. Astroturfing?
Re:Show HN: I made a site where you practice typing by retyp...
by ffpip on Tuesday October 06, 2020 @11:51AM
(#24699029)
I think only the bookID is necessary
Re:Show HN: I made a site where you practice typing by retyp...
by whiddershins on Tuesday October 06, 2020 @09:16AM
(#24697335)
This comment can’t be read, perhaps use code block formatting, or remove the http and domain info, so we can see what you mean? The link is getting truncated when it displays.
Re:Show HN: I made a site where you practice typing by retyp...
by SamBam on Tuesday October 06, 2020 @09:21AM
(#24697373)
Those links are over 200 characters long, and just look like escaped JSON, so I don't think it would help much. You could just click on them if you really wanted to know the details, but I think the question is pretty clear regardless.
Why not just use this? https://www.typelit.io/chapters/5f468ca35e91c10be0883a57/The...
Also, the JSON object is fault tolerant and will display whatever you want for a title, even if there isn't a book available: https://www.typelit.io/chapters/%7B%22%64%69%73%70%6C%61%79%...