Skip to content

Commit 5dc5dc8

Browse files
committed
update
1 parent 70f38aa commit 5dc5dc8

1 file changed

Lines changed: 32 additions & 26 deletions

File tree

Lines changed: 32 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,44 @@
11
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'
54

65
interface Props {
76
className?: string
87
}
98

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-
199
export const FeatureBanner = ({ className }: Props) => {
10+
const [isModalOpen, setIsModalOpen] = useState(false)
11+
12+
const handleCancel = () => {
13+
setIsModalOpen(false)
14+
}
15+
2016
useEffect(() => {
21-
openNotification('top')
17+
setIsModalOpen(true)
2218
}, [])
19+
2320
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+
</>
3743
)
3844
}

0 commit comments

Comments
 (0)