-
-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature(website): recipients selection page #563
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
Also it's not that pretty because I'm a terrible designer ;p if anyone has suggestions, I'm all ears! |
|
Visit the preview URL for this PR (updated for commit 03ed026): https://si-admin-staging--pr563-feature-draw-transpa-zf5tjm0f.web.app (expires Tue, 05 Dec 2023 12:35:48 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: b7b0969384059dce6ea8fad1ee1d1737e54e6676 |
import { LoaderIcon } from 'react-hot-toast'; | ||
|
||
export default function Page(props: DefaultPageProps) { | ||
const [translator, setTranslator] = useState<Translator>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a useTranslator
hook for this :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But generally, I would argue that it's better to load the translations inside a server component and pass them to the client component (see login/page.tsx
as an example). By doing that, the statically rendered pages will contain the text. Otherwise, the text will only show after the client components have been hydrated.
@@ -42,6 +44,7 @@ export default async function Navbar({ lang, country }: DefaultParams) { | |||
], | |||
}, | |||
{ title: transparency, href: transparencyHref }, | |||
{ title: selection, href: selectionHref }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should probably also show a dropdown for the transparency section. No need to do it in this PR though, I'll do it in another one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's okay, I've got it!
In local development, the cache is oftentimes not updated if you update the translations. To see them, you need to stop the website, delete the
No, you should be able to just use the react-daisyui components by importing them directly from
I think single quotes are used everywhere except for TSX/JSX ("HTML" code of components) where double quotes are used. I didn't configure this specifically, it seems to be a prettier default (see |
0fedbbd
to
0124d95
Compare
1b63c75
to
ee21059
Compare
added the actual next upcoming draw
- nicer card formatting is used to display draws - upcoming draws are now pulled from JSON files in `./draws_upcoming` - new fields in the selection github action are read from draws
ee21059
to
b7861ae
Compare
939d80e
to
6ced509
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks all good👌 I updated the components a little and added German translations
I've taken a first pass at the UI for the draw transparency page as per #562
I still need to actually pull the data from somewhere - I suspect it's possible to pull it from the repo itself as a file, as everything will be in the repo and we're using server rendering (though the component is actually
'use client'
in order to useDisclosure
from@headlessui
).Some outstanding thoughts
shared
somewhere to get the translations? I can't get them locally, but I see it pulls in a static version (rather than exploiting a local module)ui
module, but I couldn't access anything from it out-of-the-box inwebsite
. That might avoid the'use client'
declaration, and make it easier to pull the data.'
and"
in different places; is there a consensus on what to use where?