🐛 Fix some bugs
This commit is contained in:
parent
38493829d5
commit
bdd6d66e67
@ -76,8 +76,8 @@ export function CapAppBar() {
|
|||||||
{userStore.account ? (
|
{userStore.account ? (
|
||||||
<Avatar sx={{ backgroundColor: 'transparent' }} src={getAttachmentUrl(userStore.account.avatar)} />
|
<Avatar sx={{ backgroundColor: 'transparent' }} src={getAttachmentUrl(userStore.account.avatar)} />
|
||||||
) : (
|
) : (
|
||||||
<Avatar sx={{ backgroundColor: 'transparent' }}>
|
<Avatar sx={{ backgroundColor: 'transparent', color: theme.palette.text.primary }}>
|
||||||
<AccountCircle sx={{ color: theme.palette.text.primary }} className="dark:invert" />
|
<AccountCircle />
|
||||||
</Avatar>
|
</Avatar>
|
||||||
)}
|
)}
|
||||||
</IconButton>
|
</IconButton>
|
||||||
|
@ -2,13 +2,17 @@ import { sni } from '@/services/network'
|
|||||||
import { Container, Box, Typography, Alert, Collapse, Button, CircularProgress, Card, CardContent } from '@mui/material'
|
import { Container, Box, Typography, Alert, Collapse, Button, CircularProgress, Card, CardContent } from '@mui/material'
|
||||||
import { useRouter } from 'next/router'
|
import { useRouter } from 'next/router'
|
||||||
import { useEffect, useState } from 'react'
|
import { useEffect, useState } from 'react'
|
||||||
|
import { checkAuthenticatedClient, redirectToLogin, SnAuthTicket } from '@/services/auth'
|
||||||
|
|
||||||
import ErrorIcon from '@mui/icons-material/Error'
|
import ErrorIcon from '@mui/icons-material/Error'
|
||||||
import CloseIcon from '@mui/icons-material/Close'
|
import CloseIcon from '@mui/icons-material/Close'
|
||||||
import CheckIcon from '@mui/icons-material/Check'
|
import CheckIcon from '@mui/icons-material/Check'
|
||||||
import { SnAuthTicket } from '@/services/auth'
|
|
||||||
|
|
||||||
export default function AccountAuthorize() {
|
export default function AccountAuthorize() {
|
||||||
|
useEffect(() => {
|
||||||
|
if (!checkAuthenticatedClient()) redirectToLogin()
|
||||||
|
}, [])
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
||||||
const [thirdClient, setThirdClient] = useState<any>(null)
|
const [thirdClient, setThirdClient] = useState<any>(null)
|
||||||
|
Loading…
Reference in New Issue
Block a user