Skip to content

refactor: Refactor auth provider #5782

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

Merged
merged 18 commits into from
Jan 20, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Minor refactoring
  • Loading branch information
BrunoQuaresma committed Jan 18, 2023
commit 1714ca51931cfdeacb5949ddcf4bdd90b18a4ddb
6 changes: 2 additions & 4 deletions site/src/xServices/appearance/appearanceXService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,14 @@ export const appearanceMachine = createMachine(
actions: {
assignPreviewAppearance: assign({
appearance: (_, event) => event.appearance,
// The xState docs suggest that we can use a static value, but I failed
// to find a way to do that that doesn't generate type errors.
preview: (_, __) => true,
preview: (_) => true,
}),
notifyUpdateAppearanceSuccess: () => {
displaySuccess("Successfully updated appearance settings!")
},
assignAppearance: assign({
appearance: (_, event) => event.data as AppearanceConfig,
preview: (_, __) => false,
preview: (_) => false,
}),
assignGetAppearanceError: assign({
getAppearanceError: (_, event) => event.data,
Expand Down