Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into deploy/amp
Browse files Browse the repository at this point in the history
  • Loading branch information
olehmell committed Aug 15, 2023
2 parents 4b751da + c398a38 commit fc9a8a9
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 13 deletions.
1 change: 1 addition & 0 deletions .github/workflows/feature-based.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ jobs:
GH_NEXT_PUBLIC_GA_ID=G-FT28TL1W3M
GH_IPFS_PIN_URL=https://test-pin.crustcloud.io/psa
GH_COVALENT_API_KEY=cqt_rQtDdp9G9DFvqcGjVPDD4FFCyhFQ
target: runner
tags: |
${{ env.image }}
cache-from: type=local,src=/tmp/.buildx-cache
Expand Down
21 changes: 15 additions & 6 deletions src/components/navbar/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Button from '@/components/Button'
import Container from '@/components/Container'
import Logo from '@/components/Logo'
import { ANN_CHAT_ID } from '@/constants/chat'
import useIsInIframe from '@/hooks/useIsInIframe'
import usePrevious from '@/hooks/usePrevious'
import { useConfigContext } from '@/providers/ConfigProvider'
import { getBlockedResourcesQuery } from '@/services/api/moderation/query'
Expand All @@ -16,7 +17,14 @@ import { LocalStorage } from '@/utils/storage'
import dynamic from 'next/dynamic'
import Link from 'next/link'
import { useRouter } from 'next/router'
import { ComponentProps, useEffect, useMemo, useRef, useState } from 'react'
import {
ComponentProps,
ReactNode,
useEffect,
useMemo,
useRef,
useState,
} from 'react'
import { HiOutlineBell, HiOutlineChevronLeft } from 'react-icons/hi2'

const ProfileAvatar = dynamic(() => import('./ProfileAvatar'), {
Expand All @@ -33,10 +41,10 @@ export type NavbarProps = ComponentProps<'div'> & {
forceUseDefaultBackLink?: boolean
}
customContent?: (elements: {
logoLink: JSX.Element
authComponent: JSX.Element
notificationBell: JSX.Element
backButton: JSX.Element
logoLink: ReactNode
authComponent: ReactNode
notificationBell: ReactNode
backButton: ReactNode
}) => JSX.Element
}

Expand Down Expand Up @@ -115,7 +123,8 @@ export default function Navbar({
</div>
)

const notificationBell = <NotificationBell />
const isInIframe = useIsInIframe()
const notificationBell = !isInIframe && <NotificationBell />

return (
<>
Expand Down
4 changes: 2 additions & 2 deletions src/modules/chat/ChatPage/ChatPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import { replaceUrl } from '@/utils/window'
import dynamic from 'next/dynamic'
import { ImageProps } from 'next/image'
import Router, { useRouter } from 'next/router'
import { useEffect, useRef, useState } from 'react'
import { ReactNode, useEffect, useRef, useState } from 'react'
import urlJoin from 'url-join'

const NetworkStatus = dynamic(() => import('@/components/NetworkStatus'), {
Expand Down Expand Up @@ -224,7 +224,7 @@ function NavbarChatInfo({
}: {
image: ImageProps['src']
messageCount: number
backButton: JSX.Element
backButton: ReactNode
chatMetadata?: ChatMetadata
chatId: string
}) {
Expand Down
10 changes: 5 additions & 5 deletions src/modules/chat/HubPage/HubPageNavbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import NavbarWithSearch, {
import useIsInIframe from '@/hooks/useIsInIframe'
import { getSpaceQuery } from '@/services/subsocial/spaces'
import { getHubIds } from '@/utils/env/client'
import { useState } from 'react'
import { ReactNode, useState } from 'react'

export type HubPageNavbarProps = {
logo: JSX.Element
auth: JSX.Element
backButton: JSX.Element
notificationBell: JSX.Element
logo: ReactNode
auth: ReactNode
backButton: ReactNode
notificationBell: ReactNode
searchProps: NavbarWithSearchProps['searchProps']
hubId: string
chatsCount: number
Expand Down

0 comments on commit fc9a8a9

Please sign in to comment.