diff --git a/app/components/LanguagePrompt.tsx b/app/components/LanguagePrompt.tsx
index 73425f4ed..c84c6b6ec 100644
--- a/app/components/LanguagePrompt.tsx
+++ b/app/components/LanguagePrompt.tsx
@@ -42,7 +42,7 @@ function Icon({ className }: { className?: string }) {
}
export default function LanguagePrompt() {
- const { auth, ui } = useStores();
+ const { ui } = useStores();
const { t } = useTranslation();
const user = useCurrentUser();
const language = detectLanguage();
@@ -75,9 +75,7 @@ export default function LanguagePrompt() {
{
ui.setLanguagePromptDismissed();
- await auth.updateUser({
- language,
- });
+ await user.save({ language });
}}
>
{t("Change Language")}
diff --git a/app/scenes/Document/components/MultiplayerEditor.tsx b/app/scenes/Document/components/MultiplayerEditor.tsx
index 614fb3f46..d4a7a2ddb 100644
--- a/app/scenes/Document/components/MultiplayerEditor.tsx
+++ b/app/scenes/Document/components/MultiplayerEditor.tsx
@@ -93,7 +93,7 @@ function MultiplayerEditor({ onSynced, ...props }: Props, ref: any) {
);
provider.on("authenticationFailed", () => {
- void auth.fetch().catch(() => {
+ void auth.fetchAuth().catch(() => {
history.replace(homePath());
});
});
diff --git a/app/scenes/Settings/Details.tsx b/app/scenes/Settings/Details.tsx
index 79a6a8fae..c092583ee 100644
--- a/app/scenes/Settings/Details.tsx
+++ b/app/scenes/Settings/Details.tsx
@@ -28,7 +28,7 @@ import ImageInput from "./components/ImageInput";
import SettingRow from "./components/SettingRow";
function Details() {
- const { auth, dialogs, ui } = useStores();
+ const { dialogs, ui } = useStores();
const { t } = useTranslation();
const team = useCurrentTeam();
const theme = useTheme();
@@ -65,7 +65,7 @@ function Details() {
}
try {
- await auth.updateTeam({
+ await team.save({
name,
subdomain,
defaultCollectionId,
@@ -80,16 +80,7 @@ function Details() {
toast.error(err.message);
}
},
- [
- auth,
- name,
- subdomain,
- defaultCollectionId,
- team.preferences,
- publicBranding,
- customTheme,
- t,
- ]
+ [team, name, subdomain, defaultCollectionId, publicBranding, customTheme, t]
);
const handleNameChange = React.useCallback(
@@ -107,9 +98,7 @@ function Details() {
);
const handleAvatarUpload = async (avatarUrl: string) => {
- await auth.updateTeam({
- avatarUrl,
- });
+ await team.save({ avatarUrl });
toast.success(t("Logo updated"));
};
@@ -288,8 +277,8 @@ function Details() {
/>
-