|
@@ -3,7 +3,6 @@ import React, { useEffect } from 'react';
|
|
|
import { useTranslation } from 'react-i18next';
|
|
import { useTranslation } from 'react-i18next';
|
|
|
|
|
|
|
|
import AppContainer from '~/client/services/AppContainer';
|
|
import AppContainer from '~/client/services/AppContainer';
|
|
|
-import PersonalContainer from '~/client/services/PersonalContainer';
|
|
|
|
|
import { toastSuccess, toastError } from '~/client/util/apiNotification';
|
|
import { toastSuccess, toastError } from '~/client/util/apiNotification';
|
|
|
import { localeMetadatas } from '~/client/util/i18n';
|
|
import { localeMetadatas } from '~/client/util/i18n';
|
|
|
import { useSWRxPersonalSettings, usePersonalSettings } from '~/stores/personal-settings';
|
|
import { useSWRxPersonalSettings, usePersonalSettings } from '~/stores/personal-settings';
|
|
@@ -12,15 +11,11 @@ import { withUnstatedContainers } from '../UnstatedUtils';
|
|
|
|
|
|
|
|
type Props = {
|
|
type Props = {
|
|
|
appContainer: AppContainer,
|
|
appContainer: AppContainer,
|
|
|
- personalContainer: PersonalContainer,
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const BasicInfoSettings = (props: Props) => {
|
|
const BasicInfoSettings = (props: Props) => {
|
|
|
const { t } = useTranslation();
|
|
const { t } = useTranslation();
|
|
|
- const {
|
|
|
|
|
- // personalContainer will be removed by 98160
|
|
|
|
|
- appContainer, /* personalContainer, */
|
|
|
|
|
- } = props;
|
|
|
|
|
|
|
+ const { appContainer } = props;
|
|
|
|
|
|
|
|
const {
|
|
const {
|
|
|
mutate: mutateDatabaseData,
|
|
mutate: mutateDatabaseData,
|
|
@@ -37,8 +32,6 @@ const BasicInfoSettings = (props: Props) => {
|
|
|
const submitHandler = async() => {
|
|
const submitHandler = async() => {
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
|
- // TODO: SWRize apiv3Put /personal-setting/ -> https://redmine.weseek.co.jp/issues/98160
|
|
|
|
|
- // await personalContainer.updateBasicInfo();
|
|
|
|
|
update();
|
|
update();
|
|
|
mutateDatabaseData();
|
|
mutateDatabaseData();
|
|
|
toastSuccess(t('toaster.update_successed', { target: t('Basic Info') }));
|
|
toastSuccess(t('toaster.update_successed', { target: t('Basic Info') }));
|
|
@@ -180,6 +173,6 @@ const BasicInfoSettings = (props: Props) => {
|
|
|
/**
|
|
/**
|
|
|
* Wrapper component for using unstated
|
|
* Wrapper component for using unstated
|
|
|
*/
|
|
*/
|
|
|
-const BasicInfoSettingsWrapper = withUnstatedContainers(BasicInfoSettings, [AppContainer, PersonalContainer]);
|
|
|
|
|
|
|
+const BasicInfoSettingsWrapper = withUnstatedContainers(BasicInfoSettings, [AppContainer]);
|
|
|
|
|
|
|
|
export default BasicInfoSettingsWrapper;
|
|
export default BasicInfoSettingsWrapper;
|