Skip to content
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

Fixup broken buttons, styling changes #25

Merged
merged 4 commits into from
Feb 29, 2024

Conversation

kaylendog
Copy link
Contributor

  • Switch to <form> for input, it's tidier
  • Changed the styling a lot
  • Simplified some React things.

@kaylendog kaylendog self-assigned this Feb 29, 2024
@kaylendog kaylendog marked this pull request as ready for review February 29, 2024 13:18
Comment on lines +31 to +38
<ThemeContext.Provider value={{ lightMode, setLightMode }}>
<html lang="en">
<body className={inter.className}>
<Navbar />
{children}
</body>
</html>
</ThemeContext.Provider>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to move the context provider into the root layout, otherwise it only exists for /

Comment on lines -12 to -39
export function set_username(username: string) {console.log(username)} //placeholder

export function handleUsernameSubmit(usernameState: string) {
set_username(usernameState);
}

export function handleUsernameChange(e: React.FormEvent<HTMLInputElement>, setUsernameState: React.Dispatch<React.SetStateAction<string>>) {

console.log("test")
setUsernameState(e.currentTarget.value);

}

export function set_bio(bio: string) {} //placeholder

export function handleBioSubmit(bioState: string) {
set_bio(bioState);
}

export function handleBioChange(e: React.FormEvent<HTMLTextAreaElement>, setBioState: React.Dispatch<React.SetStateAction<string>>) {

setBioState(e.currentTarget.value);

}

export function toggleLightMode(lightMode: boolean) {
//backend call
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These will all be hooks with rspc.useQuery, so can go for now.

</div>

<form
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<form> is the de-facto way of handling input forms in HTML. We could use react-form or similar, but that's effort.

Comment on lines +13 to +14
"@faker-js/faker": "^8.4.1",
"@tanstack/react-virtual": "^3.1.3",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These weren't in package.json and breaks a clean install without them.

@SForbes8 SForbes8 merged commit c4c4ce0 into front-end-settings Feb 29, 2024
@kaylendog kaylendog deleted the feat/kaylendog/settings branch February 29, 2024 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants