Skip to content

Commit

Permalink
banner updates
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmoyAtb committed May 29, 2024
1 parent 5ec8541 commit a4c8972
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,8 @@ const FilesList = () => {
const [isSurveyBannerVisible, setIsSurveyBannerVisible] = useState(true)
const [contextMenuPosition, setContextMenuPosition] = useState<AnchorMenuPosition | null>(null)

console.log(accountBlacklisted)

const items: FileSystemItemType[] = useMemo(() => {
let temp = []

Expand Down
8 changes: 4 additions & 4 deletions packages/storage-ui/src/Components/Pages/BucketsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { usePageTrack } from "../../Contexts/PosthogContext"
import { Bucket, FileSystemType } from "@chainsafe/files-api-client"
import { Helmet } from "react-helmet-async"
import AnchorMenu, { AnchorMenuPosition } from "../UI-components/AnchorMenu"
import BlacklistedModeBanner from "../Elements/BlacklistedModeBanner"

export const desktopGridSettings = "2fr 5fr 150px 150px 50px !important"
export const mobileGridSettings = "1fr 150px 110px 50px !important"
Expand Down Expand Up @@ -127,7 +128,7 @@ type SortDirection = "ascend" | "descend"
const BucketsPage = () => {
const classes = useStyles()
const { storageBuckets, createBucket, refreshBuckets, removeBucket, editBucket } = useStorage()
const { accountRestricted } = useStorageApi()
const { accountRestricted, accountBlacklisted } = useStorageApi()
const [isCreateBucketModalOpen, setIsCreateBucketModalOpen] = useState(false)
const [bucketToRemove, setBucketToRemove] = useState<Bucket | undefined>()
const [isRemovingBucket, setIsRemovingBucket] = useState(false)
Expand Down Expand Up @@ -363,9 +364,8 @@ const BucketsPage = () => {
)}
</TableBody>
</Table>
{accountRestricted &&
<RestrictedModeBanner />
}
{accountRestricted && <RestrictedModeBanner />}
{accountBlacklisted && <BlacklistedModeBanner />}
<CustomModal
active={isCreateBucketModalOpen}
className={classes.createBucketModal}
Expand Down
8 changes: 4 additions & 4 deletions packages/storage-ui/src/Components/Pages/CidsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { useStorageApi } from "../../Contexts/StorageApiContext"
import { usePageTrack } from "../../Contexts/PosthogContext"
import { Helmet } from "react-helmet-async"
import { cid as isCid } from "is-ipfs"
import BlacklistedModeBanner from "../Elements/BlacklistedModeBanner"

export const desktopGridSettings = "2fr 3fr 180px 110px 80px 20px 70px !important"
export const mobileGridSettings = "2fr 4fr 50px !important"
Expand Down Expand Up @@ -100,7 +101,7 @@ const CidsPage = () => {
isLoadingPins,
resetPins
} = useStorage()
const { accountRestricted } = useStorageApi()
const { accountRestricted, accountBlacklisted } = useStorageApi()
const [addCIDOpen, setAddCIDOpen] = useState(false)
const [sortColumn, setSortColumn] = useState<SortColumn>("date_uploaded")
const [sortDirection, setSortDirection] = useState<SortDirection>("descend")
Expand Down Expand Up @@ -294,9 +295,8 @@ const CidsPage = () => {
close={() => setAddCIDOpen(false)}
modalOpen={addCIDOpen}
/>
{accountRestricted &&
<RestrictedModeBanner />
}
{accountRestricted && <RestrictedModeBanner />}
{accountBlacklisted && <BlacklistedModeBanner />}
</>
)
}
Expand Down

0 comments on commit a4c8972

Please sign in to comment.