Skip to content

Commit

Permalink
refactor: Add delete account feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Jun-Murakami committed Oct 5, 2024
1 parent e9e3e96 commit 8a2288a
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/features/app/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { Download } from '@/features/app/Download';
import { AuthElectronGoogle } from '@/features/app/AuthElectronGoogle';
import { AuthElectronApple } from '@/features/app/AuthElectronApple';
import { AuthElectronRedirect } from '@/features/app/AuthElectronRedirect';
import { DeleteAccount } from '@/features/app/DeleteAccount';
import { ModalDialog } from '@/features/common/ModalDialog';
import { InputDialog } from '@/features/common/InputDialog';

Expand Down Expand Up @@ -59,6 +60,7 @@ export default function App() {
<Route path='/auth/google' element={<AuthElectronGoogle />} />
<Route path='/auth/apple' element={<AuthElectronApple />} />
<Route path='/auth/redirect' element={<AuthElectronRedirect />} />
<Route path='/delete-account' element={<DeleteAccount />} />
<Route path='/' element={<HomePage />} />
</Routes>
</Router>
Expand Down
36 changes: 36 additions & 0 deletions src/features/app/DeleteAccount.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { Box, Typography, Button, useTheme } from '@mui/material';
import { TaskTreeLogoIcon } from '@/features/common/TaskTreesLogo';
import ReplyIcon from '@mui/icons-material/Reply';
import SettingsIcon from '@mui/icons-material/Settings';

export const DeleteAccount = () => {
const theme = useTheme();
return (
<Box sx={{ textAlign: 'center' }}>
<Typography sx={{ mt: 5, marginBottom: 0, justifyContent: 'center', alignItems: 'center', display: 'flex' }} variant='h3'>
<TaskTreeLogoIcon sx={{ width: '35px', height: '35px', marginRight: '10px', color: theme.palette.primary.main }} />
TaskTrees
</Typography>
<Typography variant='h5' sx={{ marginY: 5 }}>
アカウントの削除について
</Typography>
<Typography variant='body1' sx={{ textAlign: 'left' }}>
アカウントの削除は、ログイン後の
<Button variant='outlined' startIcon={<SettingsIcon />}>
設定
</Button>
を押して表示されるメニューから「アカウント削除」を選択することで行うことができます。サーバに保存されたデータやメールアドレスなどのアカウント情報はすべて削除され、後から復元することはできません。アカウントの削除を行う前に、データのバックアップを取得することをお勧めします。
</Typography>
<Button
variant={'outlined'}
startIcon={<ReplyIcon />}
onClick={() => {
window.location.href = '/';
}}
sx={{ mb: 10 }}
>
アプリのトップに戻る
</Button>
</Box>
);
};

0 comments on commit 8a2288a

Please sign in to comment.