diff --git a/README.md b/README.md index 4a536f09..7e786297 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,6 @@ For more information on the Manifest Network and its modules, please visit the [ ### .env ``` -NEXT_PUBLIC_ABLY_API_KEY= NEXT_PUBLIC_WALLETCONNECT_KEY= NEXT_PUBLIC_WEB3_CLIENT_ID= NEXT_PUBLIC_CHAIN=manifest diff --git a/bun.lockb b/bun.lockb index 6ab9498f..f882fe4b 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/components/groups/components/Notifications.tsx b/components/groups/components/Notifications.tsx deleted file mode 100644 index fc4b40d5..00000000 --- a/components/groups/components/Notifications.tsx +++ /dev/null @@ -1,53 +0,0 @@ -import React, { useState } from 'react'; -import { ChannelProvider } from 'ably/react'; -import useAbly from '@/hooks/useAbly'; - -interface NotificationsProps { - groupPolicyAddress: string; -} - -const NotificationsComponent: React.FC = ({ groupPolicyAddress }) => { - const { messages } = useAbly(`group-${groupPolicyAddress}`); - const [isOpen, setIsOpen] = useState(false); - - return ( -
- - {isOpen && ( -
-
-

Notifications

-
    - {messages.map((msg, index) => ( -
  • -
    {msg.data.title}
    -
    {msg.data.description}
    -
    - {new Date(msg.data.createdAt).toLocaleString()} -
    -
  • - ))} -
-
- -
-
-
- )} -
- ); -}; - -const Notifications: React.FC = ({ groupPolicyAddress }) => { - return ( - - - - ); -}; - -export default Notifications; diff --git a/hooks/useAbly.ts b/hooks/useAbly.ts deleted file mode 100644 index fb75840f..00000000 --- a/hooks/useAbly.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { useState, useEffect } from 'react'; -import { useChannel } from 'ably/react'; -import { Message, RealtimeChannel } from 'ably'; -const useAbly = (channelName: string) => { - const [messages, setMessages] = useState([]); - - const fetchHistory = async (channel: RealtimeChannel) => { - const resultPage = await channel.history({ limit: 100 }); - const historyMessages = resultPage.items.reverse(); - setMessages(historyMessages); - }; - - const { channel } = useChannel(channelName, (message: Message) => { - setMessages(prev => [...prev, message]); - }); - - useEffect(() => { - fetchHistory(channel); - }, [channel]); - - return { messages, channel }; -}; - -export default useAbly; diff --git a/package.json b/package.json index c87d2145..b369e855 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,6 @@ }, "dependencies": { "@chain-registry/assets": "^1.64.83", - "@liftedinit/manifestjs": "0.0.1-alpha.19", "@cosmjs/cosmwasm-stargate": "0.32.4", "@cosmjs/stargate": "npm:@liftedinit/stargate@0.32.4-ll.3", "@cosmos-kit/react": "2.18.0", @@ -40,12 +39,12 @@ "@headlessui/react": "^1.7.18", "@heroicons/react": "^2.1.5", "@interchain-ui/react": "1.23.31", + "@liftedinit/manifestjs": "0.0.1-alpha.19", "@react-three/drei": "^9.114.0", "@react-three/fiber": "^8.17.8", "@tanstack/react-query": "^5.55.0", "@tanstack/react-query-devtools": "^5.55.0", "@types/file-saver": "^2.0.7", - "ably": "^2.3.2", "apexcharts": "^3.53.0", "autoprefixer": "^10.4.20", "babel-plugin-glsl": "^1.0.0", diff --git a/pages/_app.tsx b/pages/_app.tsx index b260359e..b901e143 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -41,14 +41,6 @@ import MobileNav from '@/components/react/mobileNav'; import { useEndpointStore } from '@/store/endpointStore'; import EndpointSelector from '@/components/react/endpointSelector'; -// websocket stuff might delete -// import * as Ably from "ably"; -// import { AblyProvider, useChannel, usePresence } from "ably/react"; - -// const ablyClient = new Ably.Realtime({ -// key: process.env.NEXT_PUBLIC_ABLY_API_KEY, -// }); - type ManifestAppProps = AppProps & { Component: AppProps['Component']; pageProps: AppProps['pageProps'];