diff --git a/apps/u3/.env.development b/apps/u3/.env.development index 05f2e24f..d692e4b0 100644 --- a/apps/u3/.env.development +++ b/apps/u3/.env.development @@ -44,7 +44,7 @@ REACT_APP_DAPP_NFT_RECIPIENT_ADDRESS = 0xA25532B1287dEe6501fFa13Ff457fFcc9a6Ca6 REACT_APP_SHARE_DOMAIN = https://share-dev.u3.xyz # U3 Caster Mint: [1.4.0] Goerli -REACT_APP_CASTER_NFT_TO_MINT = 0x3cf0dfeab5bd741683f0a63c2342a8113c416694 +REACT_APP_CASTER_NFT_TO_MINT = 0x30ebadfd060bf39eac345f75e2eaa540db955fe2 REACT_APP_CASTER_NFT_FIXED_PRICE_STRATEGY = 0xD8EB23E82f0795427F27D7F20CAb56e7630D1166 REACT_APP_CASTER_NFT_CHAIN_ID = 5 REACT_APP_CASTER_NFT_RECIPIENT_ADDRESS = 0x885d0069e238C7929F0351689A9493fECad952Fe diff --git a/apps/u3/.vscode/settings.json b/apps/u3/.vscode/settings.json index 9e42c302..c6f336cf 100644 --- a/apps/u3/.vscode/settings.json +++ b/apps/u3/.vscode/settings.json @@ -3,6 +3,7 @@ "cSpell.words": [ "biolink", "deeplink", + "Degen", "Farcaster", "Farcster", "farsign", diff --git a/apps/u3/package.json b/apps/u3/package.json index 108df773..893b3e57 100644 --- a/apps/u3/package.json +++ b/apps/u3/package.json @@ -4,7 +4,7 @@ "private": true, "dependencies": { "@airstack/airstack-react": "^0.4.7", - "@farcaster/hub-web": "^0.6.2", + "@farcaster/hub-web": "^0.7.3", "@lens-protocol/metadata": "^1.1.3", "@lens-protocol/react-web": "^2.0.0-alpha.25", "@lens-protocol/wagmi": "^3.0.0-alpha.22", @@ -33,6 +33,7 @@ "@tiptap/react": "^2.1.13", "@types/validator": "^13.11.7", "@us3r-network/auth-with-rainbowkit": "^0.2.1", + "@us3r-network/data-model": "^0.7.0", "@us3r-network/link": "0.7.1-alpha.0", "@us3r-network/profile": "0.7.0", "@wagmi/core": "^1.4.12", diff --git a/apps/u3/public/service-worker-dev.js b/apps/u3/public/service-worker-dev.js index e69de29b..ff7444fe 100644 --- a/apps/u3/public/service-worker-dev.js +++ b/apps/u3/public/service-worker-dev.js @@ -0,0 +1,12 @@ +/* eslint-disable */ + +// listen for push event +self.addEventListener('push', (event) => { + let { title, body, icon } = event.data.json(); + if (!title) title = 'U3 - Your Web3 Gateway'; + if (!body) return; + self.registration.showNotification(title, { + body, + icon: icon || `logo192.png`, + }); +}); diff --git a/apps/u3/public/service-worker.js b/apps/u3/public/service-worker.js new file mode 100644 index 00000000..ff7444fe --- /dev/null +++ b/apps/u3/public/service-worker.js @@ -0,0 +1,12 @@ +/* eslint-disable */ + +// listen for push event +self.addEventListener('push', (event) => { + let { title, body, icon } = event.data.json(); + if (!title) title = 'U3 - Your Web3 Gateway'; + if (!body) return; + self.registration.showNotification(title, { + body, + icon: icon || `logo192.png`, + }); +}); diff --git a/apps/u3/src/components/common/assets/imgs/logo-icon.svg b/apps/u3/src/components/common/assets/imgs/logo-icon.svg index eaf4b82f..e80ceef1 100644 --- a/apps/u3/src/components/common/assets/imgs/logo-icon.svg +++ b/apps/u3/src/components/common/assets/imgs/logo-icon.svg @@ -1,19 +1,5 @@ - - - - - - - - - - - - - - - - - - + + + + diff --git a/apps/u3/src/components/common/button/ColorButton.tsx b/apps/u3/src/components/common/button/ColorButton.tsx index e8f20701..86d75d68 100644 --- a/apps/u3/src/components/common/button/ColorButton.tsx +++ b/apps/u3/src/components/common/button/ColorButton.tsx @@ -9,7 +9,7 @@ export default function ColorButton({ return ( + ); +} diff --git a/apps/u3/src/components/common/icons/SearchIcon.tsx b/apps/u3/src/components/common/icons/SearchIcon.tsx index dbfc4bdb..69011b79 100644 --- a/apps/u3/src/components/common/icons/SearchIcon.tsx +++ b/apps/u3/src/components/common/icons/SearchIcon.tsx @@ -1,4 +1,6 @@ -export default function SearchIcon({ className }: { className?: string }) { +import { ComponentPropsWithRef } from 'react'; + +export default function SearchIcon(props: ComponentPropsWithRef<'svg'>) { return ( {!isMobile && ( - import(`./DailyPosterModal`)); - -export default function CreatePosterBtn({ - disabled, - ...layoutProps -}: DailyPosterLayoutProps & { disabled?: boolean }) { - const [open, setOpen] = useState(false); - return ( - <> - setOpen(true)} - > - Share - - {DailyPosterModal && ( - setOpen(false)} - /> - )} - - ); -} - -const Wrapper = styled(ButtonPrimary)` - display: flex; - width: 270px; - height: 270px; - justify-content: center; - align-items: start; - gap: 20px; - - border-radius: 50%; - background: #f7f6f4; - color: var(--14171-a, #14171a); - box-shadow: 4px 10px rgba(0, 0, 0, 0.05); - - position: fixed; - bottom: 0; - right: 50%; - transform: translate(56%, 200px); - padding-top: 30px; - box-sizing: border-box; - - leading-trim: both; - text-edge: cap; - font-family: Marion; - font-size: 20px; - font-style: normal; - font-weight: 700; - line-height: normal; - z-index: 20; - - cursor: pointer; - &:hover { - width: 270px; - height: 270px; - background: #1b1e23; - border: 1px solid #39424c; - color: #fff; - } -`; diff --git a/apps/u3/src/components/explore/poster/layout/Footer.tsx b/apps/u3/src/components/explore/poster/layout/Footer.tsx deleted file mode 100644 index e2f0a935..00000000 --- a/apps/u3/src/components/explore/poster/layout/Footer.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import dayjs from 'dayjs'; - -export default function Footer() { - return ( -
- {dayjs().format('MMMM D, YYYY')} - From u3.xyz -
- ); -} diff --git a/apps/u3/src/components/explore/poster/layout/links/TopLinks.tsx b/apps/u3/src/components/explore/poster/layout/links/TopLinks.tsx deleted file mode 100644 index 016b1109..00000000 --- a/apps/u3/src/components/explore/poster/layout/links/TopLinks.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import LinkCard, { type LinkCardData } from './LinkCard'; - -export type TopLinksData = Array; -export type TopLinksProps = { links: TopLinksData }; - -export default function TopLinks({ links }: TopLinksProps) { - return ( -
-

- Top Links -

-
- {links.map((item) => { - return ; - })} -
-
- ); -} diff --git a/apps/u3/src/components/fren/Rss3Content.tsx b/apps/u3/src/components/fren/Rss3Content.tsx index d2178b40..1ce8fa1b 100644 --- a/apps/u3/src/components/fren/Rss3Content.tsx +++ b/apps/u3/src/components/fren/Rss3Content.tsx @@ -473,7 +473,7 @@ export default function Rss3Content({ address, empty }: Rss3ContentProps) { followingMap, } = useAppSelector(selectFrensHandlesState); const feedRef = useRef(null); - const { getProfileWithDid, profile } = useProfileState()!; + const { getProfileWithDid, profile } = useProfileState(); const loading = useMemo( () => status === AsyncRequestStatus.PENDING, diff --git a/apps/u3/src/components/layout/Index.tsx b/apps/u3/src/components/layout/Index.tsx index d86ccb42..ef74ed1e 100644 --- a/apps/u3/src/components/layout/Index.tsx +++ b/apps/u3/src/components/layout/Index.tsx @@ -19,6 +19,7 @@ import DappMenu from '../dapp/launcher/DappMenu'; import MobileHeader from './mobile/MobileHeader'; import MobileNav from './mobile/MobileNav'; import { MobileGuide } from './mobile/MobileGuide'; +import AddPostMobile from '../social/AddPostMobile'; function Layout() { const { ready } = useAuthentication(); @@ -31,6 +32,9 @@ function Layout() { {isMobile ? (
+
+ +
) : ( diff --git a/apps/u3/src/components/layout/Nav.tsx b/apps/u3/src/components/layout/Nav.tsx index e8e77865..f13ff9b4 100644 --- a/apps/u3/src/components/layout/Nav.tsx +++ b/apps/u3/src/components/layout/Nav.tsx @@ -5,13 +5,14 @@ * @LastEditTime: 2023-10-30 14:54:49 * @Description: file description */ -import { useCallback, useRef, useState } from 'react'; +import { ComponentPropsWithRef, useCallback, useRef, useState } from 'react'; import { useNavigate } from 'react-router-dom'; import styled from 'styled-components'; import { isMobile } from 'react-device-detect'; import useLogin from '../../hooks/shared/useLogin'; import { CustomNavObject, navs } from '../../route/nav'; import useRoute from '../../route/useRoute'; +import { cn } from '@/lib/utils'; type Props = { onlyIcon?: boolean; @@ -72,7 +73,7 @@ export default function Nav({ onlyIcon }: Props) { isActive={isActive} onClick={() => navigate(nav.route.path)} > - {nav.icon} + {nav.icon} {!isMobile && renderNavItemText(nav)} ); @@ -116,9 +117,9 @@ export default function Nav({ onlyIcon }: Props) { isActive={groupIsActive} onClick={() => handleGroupClick(item.key)} > - + {item.icon} - + {!isMobile && renderNavItemText(item)} @@ -179,16 +180,36 @@ export const PcNavItem = styled.div<{ isActive?: boolean; disabled?: boolean }>` cursor: not-allowed; `}; `; -export const PcNavItemIconBox = styled.div<{ isActive?: boolean }>` - flex-shrink: 0; +export function NavItemIconBox({ + isActive, + className, + children, + ...props +}: ComponentPropsWithRef<'div'> & { isActive?: boolean }) { + return ( +
+ {children} +
+ ); +} +export const NavItemIconInner = styled.div<{ isActive?: boolean }>` + width: 100%; + height: 100%; svg { + width: 100%; + height: 100%; path { stroke: ${({ isActive }) => (isActive ? `#fff` : '#718096')}; transition: all 0.3s ease-out; } } - transition: all 0.3s ease-out; - position: relative; `; export const PcNavItemTextBox = styled.div` overflow: hidden; diff --git a/apps/u3/src/components/layout/menu.tsx b/apps/u3/src/components/layout/menu.tsx index 3859b31b..f06b6d50 100644 --- a/apps/u3/src/components/layout/menu.tsx +++ b/apps/u3/src/components/layout/menu.tsx @@ -7,15 +7,16 @@ */ import styled from 'styled-components'; import { useNavigate } from 'react-router-dom'; -import { useState } from 'react'; +import { useMemo, useState } from 'react'; import LoginButton from './LoginButton'; -import Nav, { NavWrapper, PcNavItem, PcNavItemIconBox } from './Nav'; +import Nav, { NavWrapper, PcNavItem, NavItemIconBox } from './Nav'; import { ReactComponent as LogoIconSvg } from '../common/assets/imgs/logo-icon.svg'; import { ReactComponent as MessageChatSquareSvg } from '../common/assets/svgs/message-chat-square.svg'; import { ReactComponent as ContactUsSvg } from '../common/assets/svgs/contact-us.svg'; import MessageModal from '../message/MessageModal'; import { NavModalName, useNav } from '../../contexts/NavCtx'; import ContactUsModal from './ContactUsModal'; +import { useFarcasterCtx } from '@/contexts/social/FarcasterCtx'; export default function Menu() { const [isOpen, setIsOpen] = useState(false); @@ -38,7 +39,7 @@ export default function Menu() { ) : ( Alpha @@ -48,6 +49,15 @@ export default function Menu() {