diff --git a/frontend/src/app/providers/userProvider.tsx b/frontend/src/app/providers/userProvider.tsx index ee2973c..cef2739 100644 --- a/frontend/src/app/providers/userProvider.tsx +++ b/frontend/src/app/providers/userProvider.tsx @@ -27,7 +27,6 @@ export default function UserProvider({ children }: IChildren) { .then(setUser) .catch( (error: AxiosError) => { - console.log(error) if (error.response?.data) { const statusCode = (error.response.data as {code: number}).code.toString() console.log(statusCode) @@ -35,8 +34,10 @@ export default function UserProvider({ children }: IChildren) { setSub(false) setLink(error.response.headers['X-channel']) } + else { + setUser(null) + } } - setUser(null) }) } @@ -50,8 +51,7 @@ export default function UserProvider({ children }: IChildren) { if (!isSub) { return - } - return ( + } else return ( {children} diff --git a/frontend/src/pages/auth/ui/style.module.scss b/frontend/src/pages/auth/ui/style.module.scss index c2e6331..1a07486 100644 --- a/frontend/src/pages/auth/ui/style.module.scss +++ b/frontend/src/pages/auth/ui/style.module.scss @@ -54,3 +54,11 @@ } } +.sub-button-list { + width: 100%; + display: flex; + align-items: center; + justify-content: center; + gap: 12px; +} + diff --git a/frontend/src/pages/auth/ui/sub.tsx b/frontend/src/pages/auth/ui/sub.tsx index 8350640..6ea37cc 100644 --- a/frontend/src/pages/auth/ui/sub.tsx +++ b/frontend/src/pages/auth/ui/sub.tsx @@ -1,7 +1,8 @@ -import { Button, Text } from "@gravity-ui/uikit" +import { Button, Icon, Text } from "@gravity-ui/uikit" import styles from './style.module.scss' import { useContext } from "react" import { UserContext } from "../../../app/providers" +import { LogoTelegram } from "@gravity-ui/icons" interface Props { link: string @@ -11,8 +12,12 @@ export function ChannelPage({link}: Props) { const {updateUser} = useContext(UserContext) return
- Вы не подписаны на Подслушано 2107 🐝 - - +
+ Вы не подписаны на Подслушано 2107 🐝 +
+ + +
+
} \ No newline at end of file