Skip to content

Commit

Permalink
feat: notification only mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
friendlysxw committed Jan 31, 2024
1 parent 87fb551 commit 28437e0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
12 changes: 4 additions & 8 deletions apps/u3/src/components/notification/NotificationModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,20 @@ import LensIcon from '../common/icons/LensIcon';
import FarcasterIcon from '../common/icons/FarcasterIcon';
import Loading from '../common/loading/Loading';
import { useNav } from '../../contexts/NavCtx';
import { NotificationSettingsGroup } from './PushNotificationsToogleBtn';
import isInstalledPwa from '@/utils/shared/isInstalledPwa';
// import { NotificationSettingsGroup } from './PushNotificationsToogleBtn';

export default function NotificationModal() {
const { openNotificationModal, setOpenNotificationModal } = useNav();
const { notifications, loading, hasMore, loadMore, farcasterUserData } =
useNotificationStore();
const isPwa = isInstalledPwa();
return (
<Wrapper open={openNotificationModal}>
<Body>
<Header>
<Title>Notifications</Title>
{isPwa && (
<div className="flex-1 text-[white] flex overflow-hidden whitespace-nowrap">
<NotificationSettingsGroup />
</div>
)}
{/* <div className="text-[white] flex gap-[100px] w-[100px] overflow-hidden whitespace-nowrap">
<NotificationSettingsGroup />
</div> */}
<ModalCloseBtn onClick={() => setOpenNotificationModal(false)} />
</Header>
{notifications && notifications.length > 0 && (
Expand Down
14 changes: 7 additions & 7 deletions apps/u3/src/container/Notification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from '@/contexts/notification/NotificationStoreCtx';
import NotificationList from '@/components/notification/ui/NotificationList';
import { NotificationSettingsGroup } from '@/components/notification/PushNotificationsToogleBtn';
import isInstalledPwa from '@/utils/shared/isInstalledPwa';
// import isInstalledPwa from '@/utils/shared/isInstalledPwa';

export default function Notification() {
const isAuthenticated = useIsAuthenticated();
Expand All @@ -28,14 +28,14 @@ function NotificationPage() {
const { notifications, loading, hasMore, loadMore, farcasterUserData } =
useNotificationStore();

const isPwa = isInstalledPwa();
// const isPwa = isInstalledPwa();
return (
<>
{isPwa && (
<div className="text-[white] flex gap-2 pt-[10px]">
<NotificationSettingsGroup />
</div>
)}
{/* {isPwa && ( */}
<div className="text-[white] flex gap-2 pt-[10px]">
<NotificationSettingsGroup />
</div>
{/* )} */}

<NotificationList
notifications={notifications}
Expand Down

0 comments on commit 28437e0

Please sign in to comment.