Skip to content

Commit 0a02122

Browse files
committed
fix(alerts): use local alert helpers instead of ant native
#162
1 parent 2deeace commit 0a02122

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/features/auth/page/index.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from "react";
22
import { GithubFilled } from "@ant-design/icons";
3-
import { Alert, Card, notification } from "antd";
3+
import { Alert, Card } from "antd";
4+
import { alert } from "shared/helpers";
45
// !!! FIXME: loop imports
56
import { useTitle } from "pages/helpers";
67
import { authorizeGithub } from "../firebase";
@@ -21,14 +22,12 @@ import "./index.scss";
2122
const AuthPage = () => {
2223
useTitle("Sign in to Github Client");
2324
const { login } = useAuth();
24-
const showError = (message: string) =>
25-
notification.error({ message: "Authorization error", description: message, top: 72 });
2625

2726
// TODO: add ability to specify redirect url
2827
const authorize = () => {
2928
authorizeGithub()
3029
.then(login)
31-
.catch((err: Error) => showError(err.message));
30+
.catch((err: Error) => alert.error("Authorization error", err.message));
3231
};
3332

3433
return (

0 commit comments

Comments
 (0)