|
1 | 1 | import Link from 'next/link' |
2 | | -import React, { useEffect } from 'react' |
3 | | -import { notification } from 'antd' |
4 | | -import { NotificationPlacement } from 'antd/lib/notification' |
| 2 | +import React, { useEffect, useState } from 'react' |
| 3 | +import { Modal } from 'antd' |
5 | 4 |
|
6 | 5 | interface Props { |
7 | 6 | className?: string |
8 | 7 | } |
9 | 8 |
|
10 | | -const openNotification = (placement: NotificationPlacement) => { |
11 | | - notification.info({ |
12 | | - message: `Notification`, |
13 | | - description: `Stakes.social has been deprecated in accordance with the announcement of 27 August 2024. Withdraw rewards from the networks.`, |
14 | | - duration: null, |
15 | | - placement |
16 | | - }) |
17 | | -} |
18 | | - |
19 | 9 | export const FeatureBanner = ({ className }: Props) => { |
| 10 | + const [isModalOpen, setIsModalOpen] = useState(false) |
| 11 | + |
| 12 | + const handleCancel = () => { |
| 13 | + setIsModalOpen(false) |
| 14 | + } |
| 15 | + |
20 | 16 | useEffect(() => { |
21 | | - openNotification('top') |
| 17 | + setIsModalOpen(true) |
22 | 18 | }, []) |
| 19 | + |
23 | 20 | return ( |
24 | | - <span className={className}> |
25 | | - <p className="mb-1 font-bold">New:</p> |
26 | | - <Link href="https://clubs.place" passHref> |
27 | | - <a |
28 | | - target="_blank" |
29 | | - rel="norefferer noopener" |
30 | | - className={`relative overflow-hidden rounded-lg transition-all duration-150 ease-in-out hover:shadow-[0_0_0_10px_rgba(0,0,0,0.1)] w-full block bg-[#150039]`} |
31 | | - > |
32 | | - <img src="/images/banner/desktop.png" className="w-full h-auto hidden lg:block" /> |
33 | | - <img src="/images/banner/mobile.png" className="w-full h-auto lg:hidden" /> |
34 | | - </a> |
35 | | - </Link> |
36 | | - </span> |
| 21 | + <> |
| 22 | + <span className={className}> |
| 23 | + <p className="mb-1 font-bold">New:</p> |
| 24 | + <Link href="https://clubs.place" passHref> |
| 25 | + <a |
| 26 | + target="_blank" |
| 27 | + rel="norefferer noopener" |
| 28 | + className="overflow-hidden rounded-lg transition-all duration-150 ease-in-out hover:shadow-[0_0_0_10px_rgba(0,0,0,0.1)] w-full block bg-[#150039]" |
| 29 | + > |
| 30 | + <img src="/images/banner/desktop.png" className="w-full h-auto hidden lg:block" /> |
| 31 | + <img src="/images/banner/mobile.png" className="w-full h-auto lg:hidden" /> |
| 32 | + </a> |
| 33 | + </Link> |
| 34 | + </span> |
| 35 | + |
| 36 | + <Modal open={isModalOpen} footer={null} onCancel={handleCancel}> |
| 37 | + <p className="text-md mt-5"> |
| 38 | + Stakes.social has been deprecated in accordance with the announcement of 27 August 2024. Withdraw rewards from |
| 39 | + the networks. |
| 40 | + </p> |
| 41 | + </Modal> |
| 42 | + </> |
37 | 43 | ) |
38 | 44 | } |
0 commit comments