From 43d1af42226c31dffb0d120634eb46319a406752 Mon Sep 17 00:00:00 2001 From: Muhammed Talha Korkmaz Date: Fri, 4 Oct 2024 23:51:33 +0300 Subject: [PATCH] fix: heroicons --- src/components/Notification.tsx | 68 +++++++++++++++++++------------ src/components/UploadMetadata.tsx | 5 ++- src/views/GalleryView/NftCard.tsx | 5 ++- 3 files changed, 49 insertions(+), 29 deletions(-) diff --git a/src/components/Notification.tsx b/src/components/Notification.tsx index 3aa8434..bde0c8f 100644 --- a/src/components/Notification.tsx +++ b/src/components/Notification.tsx @@ -1,21 +1,21 @@ -import { useEffect, useState } from 'react' +import { useEffect, useState } from "react"; + +import useNotificationStore from "../stores/useNotificationStore"; +import { useConnection } from "@solana/wallet-adapter-react"; +import { useNetworkConfiguration } from "contexts/NetworkConfigurationProvider"; import { CheckCircleIcon, InformationCircleIcon, XCircleIcon, -} from '@heroicons/react/outline' -import { XIcon } from '@heroicons/react/solid' -import useNotificationStore from '../stores/useNotificationStore' -import { useConnection } from '@solana/wallet-adapter-react'; -import { getExplorerUrl } from '../utils/explorer' -import { useNetworkConfiguration } from 'contexts/NetworkConfigurationProvider'; +} from "@heroicons/react/24/outline"; +import { XCircleIcon as XIcon } from "@heroicons/react/24/solid"; const NotificationList = () => { const { notifications, set: setNotificationStore } = useNotificationStore( (s) => s - ) + ); - const reversedNotifications = [...notifications].reverse() + const reversedNotifications = [...notifications].reverse(); return (
{
); -} +}; const Notification = ({ type, message, description, txid, onHide }) => { const { connection } = useConnection(); const { networkConfiguration } = useNetworkConfiguration(); - // TODO: we dont have access to the network or endpoint here.. + // TODO: we dont have access to the network or endpoint here.. // getExplorerUrl(connection., txid, 'tx') // Either a provider, context, and or wallet adapter related pro/contx need updated - useEffect(() => { const id = setTimeout(() => { - onHide() + onHide(); }, 8000); return () => { @@ -68,16 +67,18 @@ const Notification = ({ type, message, description, txid, onHide }) => {
-
+
- {type === 'success' ? ( + {type === "success" ? ( ) : null} - {type === 'info' && } - {type === 'error' && ( - + {type === "info" && ( + )} + {type === "error" && }
{message}
@@ -86,15 +87,32 @@ const Notification = ({ type, message, description, txid, onHide }) => { ) : null} {txid ? (
- - -
{txid.slice(0, 8)}... + + + +
+ {txid.slice(0, 8)}... {txid.slice(txid.length - 8)}
@@ -113,7 +131,7 @@ const Notification = ({ type, message, description, txid, onHide }) => {
- ) -} + ); +}; -export default NotificationList +export default NotificationList; diff --git a/src/components/UploadMetadata.tsx b/src/components/UploadMetadata.tsx index 0945a99..34ebdcf 100644 --- a/src/components/UploadMetadata.tsx +++ b/src/components/UploadMetadata.tsx @@ -1,11 +1,12 @@ import { FC, useState, Fragment, useEffect } from "react"; import { Listbox, Transition } from "@headlessui/react"; -import { CheckIcon, SelectorIcon } from "@heroicons/react/solid"; + import { useWallet } from "@solana/wallet-adapter-react"; import { WebIrys } from "@irys/sdk"; import { notify } from "../utils/notifications"; +import { CheckIcon, ChevronDownIcon } from "@heroicons/react/24/outline"; const bundlers = [ { id: 1, network: "mainnet-beta", name: "https://node1.irys.xyz" }, @@ -195,7 +196,7 @@ export const UploadMetadata: FC = ({}) => { {!selected ? "Select Network" : selected.network} -