-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
add cloud_mode #1567
add cloud_mode #1567
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
❌ Deploy Preview for heartfelt-souffle-72e1df failed.
|
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 don't like the idea of passing settingsDisabled
down the chain. It's hard to follow. Just create a build time env var and check that where needed.
Also if you hit a restricted page in should just stop. It doesn't need to render anything. No need to pass anything.
components/layout/Header.js
Outdated
</div> | ||
)} | ||
<div className={styles.buttons}> | ||
<ThemeButton /> | ||
<LanguageButton menuAlign="right" /> | ||
{user && <UserButton />} | ||
{user && <UserButton settingsDisabled={settingsDisabled} />} |
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.
Makes no sense to pass this prop. Just check and don't show the button.
components/settings/UserButton.js
Outdated
@@ -9,7 +9,7 @@ import styles from './UserButton.module.css'; | |||
import { AUTH_TOKEN } from 'lib/constants'; | |||
import useUser from 'hooks/useUser'; | |||
|
|||
export default function UserButton() { | |||
export default function UserButton({ settingsDisabled }) { |
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.
This entire button should be hidden.
hide app functionality based on cloud_mode