-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cce6754
commit 3b1407a
Showing
4 changed files
with
33 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,22 @@ | ||
import { Button } from 'antd' | ||
import { useSendEvent } from 'src/providers/AnalyticContext' | ||
import { redirectToLogin } from 'src/utils/url' | ||
import NoData from '../utils/EmptyList' | ||
|
||
export const NotAuthorized = () => ( | ||
<NoData description='Only signed in users can access this page'> | ||
<Button onClick={() => redirectToLogin()}>Sign in</Button> | ||
</NoData> | ||
) | ||
export const NotAuthorized = () => { | ||
const sendEvent = useSendEvent() | ||
return ( | ||
<NoData description='Only signed in users can access this page'> | ||
<Button | ||
onClick={() => { | ||
redirectToLogin() | ||
sendEvent('login_button_clicked', { eventSource: 'polkaverse-ui-not-authorized' }) | ||
}} | ||
> | ||
Sign in | ||
</Button> | ||
</NoData> | ||
) | ||
} | ||
|
||
export default NotAuthorized |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters