beehaw-org / ui-project

UI project for lemmy with the goal of being accessible to contribute and have a focus on design
GNU Affero General Public License v3.0
11 stars 3 forks source link

Connect to a Lemmy backend #35

Closed sunaurus closed 1 year ago

sunaurus commented 1 year ago

Allows configuring a backend through the LEMMY_BACKEND env var.

For example, with LEMMY_BACKEND=https://lemm.ee: Screenshot 2023-08-10 at 22 05 19

And with LEMMY_BACKEND=https://beehaw.org: Screenshot 2023-08-10 at 22 05 37

Also:

Note that lemmy-js-client accepts a fetchFunction, so we are able to fully take advantage of request memoization by passing in our own fetch. For example, even though there are multiple components rendered on the front page which call apiClient.getSite(), the HTTP request is actually only made once.

sunaurus commented 1 year ago

The sidebar markdown rendering needs some more work in a future PR, it looks a bit wonky right now (but making it pretty wasn't the goal of this PR anyway)