-
Couldn't load subscription status.
- Fork 47
discover section #808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jkbktl
wants to merge
20
commits into
status-im:main
Choose a base branch
from
jkbktl:feat/discover-section
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
discover section #808
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
6a0b8de
add connectkit
jkbktl 5e063ab
shared providers
jkbktl 3697f43
move turbopack from experimental
jkbktl 396fda3
Update ignoreCommand in vercel.json
felicio 74efb1f
add button to portfolio, add wallet connect
jkbktl fb55c94
f builds
jkbktl 84430fb
f
jkbktl 216f2d8
f shared
jkbktl 6346e55
clean up
jkbktl 31f2c9f
u
jkbktl 4308a1c
Add wallet connect feature
jkbktl 0e6cd78
u
jkbktl 99fde63
u
jkbktl 59b2407
add ui for discover section
jkbktl 0146c40
update assets, add skeleton, filtering, types
jkbktl 609787a
fix tag color
jkbktl 702c6b0
Create friendly-cats-draw.md
jkbktl 6ff1e5c
Update apps/hub/src/data/featured-apps.ts
jkbktl 0e94a8f
f bg-size styling
jkbktl 5c27ca9
update link for get featured
jkbktl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| "@status-im/status-network": patch | ||
| "hub": patch | ||
| --- | ||
|
|
||
| add wallet connect |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| "@status-im/status-network": patch | ||
| "hub": patch | ||
| --- | ||
|
|
||
| discover section |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,6 @@ const config = { | |
| plugins: { | ||
| tailwindcss: {}, | ||
| }, | ||
| }; | ||
| } | ||
|
|
||
| export default config; | ||
| export default config | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,36 +1,90 @@ | ||
| 'use client' | ||
|
|
||
| interface AppCardProps { | ||
| import { ExternalIcon } from '@status-im/icons/20' | ||
| import { TwitterIcon } from '@status-im/icons/social' | ||
| import { ButtonLink } from '@status-im/status-network/components' | ||
| import Image from 'next/image' | ||
|
|
||
| type Props = { | ||
| name: string | ||
| description: string | ||
| category: string | ||
| onLaunch: () => void | ||
| website: string | ||
| twitter?: string | ||
| cover: string | ||
| icon: string | ||
| } | ||
|
|
||
| export function AppCard({ | ||
| name, | ||
| description, | ||
| category, | ||
| onLaunch, | ||
| }: AppCardProps) { | ||
| function AppCard(props: Props) { | ||
| const { name, description, website, twitter, cover, icon } = props | ||
|
|
||
| return ( | ||
| <div className="rounded-16 border border-neutral-20 bg-white-100 p-5 shadow-1 transition-colors hover:border-neutral-30"> | ||
| <div className="mb-4"> | ||
| <div className="mb-2 flex items-center justify-between"> | ||
| <span className="rounded-full bg-customisation-purple-50/10 px-2 py-0.5 text-13 font-medium text-purple"> | ||
| {category} | ||
| </span> | ||
| <div className="flex h-full flex-col rounded-28 border border-neutral-20 bg-white-100 p-2 shadow-2 transition-colors hover:border-neutral-30"> | ||
| <div className="relative mb-4"> | ||
| <div className="flex aspect-[12/5] w-full items-center justify-center overflow-hidden rounded-24 bg-neutral-20"> | ||
| <Image | ||
| src={cover} | ||
| alt={name} | ||
| fill | ||
| className="overflow-hidden rounded-24 object-cover" | ||
| /> | ||
| </div> | ||
| <div className="absolute bottom-[-15px] left-2 flex size-20 items-center justify-center overflow-hidden rounded-24 bg-neutral-40 text-11 text-neutral-60"> | ||
| <Image src={icon} alt={name} fill className="object-cover" /> | ||
| </div> | ||
| <h4 className="mb-2 text-19 font-semibold text-neutral-90">{name}</h4> | ||
| <p className="text-13 leading-relaxed text-neutral-60">{description}</p> | ||
| </div> | ||
|
|
||
| <button | ||
| onClick={onLaunch} | ||
| className="w-full rounded-16 bg-neutral-10 px-3 py-2.5 text-13 font-medium text-neutral-90 transition-colors hover:bg-neutral-20" | ||
| > | ||
| Launch App | ||
| </button> | ||
| <div className="flex flex-1 flex-col gap-1 px-2 pb-2 pt-[10px]"> | ||
| <h3 className="mb-1 text-27 font-semibold text-neutral-90">{name}</h3> | ||
| <p className="mb-auto text-15 font-400 text-neutral-100"> | ||
| {description} | ||
| </p> | ||
| <div className="mt-1 flex items-start gap-2"> | ||
| <ButtonLink | ||
| href={website} | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| variant="white" | ||
| size="32" | ||
| > | ||
| {website.replace('https://', '')}{' '} | ||
| <ExternalIcon className="size-4 text-neutral-50" /> | ||
| </ButtonLink> | ||
| {twitter && ( | ||
| <ButtonLink | ||
| href={`https://x.com/${twitter}`} | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| variant="white" | ||
| size="32" | ||
| > | ||
| <TwitterIcon className="size-4 text-neutral-50" /> | ||
| </ButtonLink> | ||
| )} | ||
| </div> | ||
| </div> | ||
| </div> | ||
| ) | ||
| } | ||
|
|
||
| function AppCardSkeleton() { | ||
| return ( | ||
| <div className="rounded-28 border border-neutral-20 bg-white-100 p-2 shadow-2"> | ||
| <div className="relative mb-4"> | ||
| <div className="aspect-[12/5] w-full animate-skeleton overflow-hidden rounded-24 bg-gradient-to-r from-neutral-10 via-white-100 to-neutral-10 bg-[size:400%_400%]" /> | ||
| <div className="absolute bottom-[-15px] left-2 size-20 animate-skeleton rounded-24 bg-gradient-to-r from-neutral-20 via-white-100 to-neutral-20 bg-[size:400%_400%]" /> | ||
| </div> | ||
|
|
||
| <div className="flex flex-col gap-1 px-2 pb-2 pt-[10px]"> | ||
| <div className="mb-1 h-8 w-3/4 animate-skeleton rounded-12 bg-gradient-to-r from-neutral-10 via-white-100 to-neutral-10 bg-[size:400%_400%]" /> | ||
| <div className="h-5 w-full animate-skeleton rounded-8 bg-gradient-to-r from-neutral-10 via-white-100 to-neutral-10 bg-[size:400%_400%]" /> | ||
| <div className="h-5 w-2/3 animate-skeleton rounded-8 bg-gradient-to-r from-neutral-10 via-white-100 to-neutral-10 bg-[size:400%_400%]" /> | ||
| <div className="mt-1 flex items-start gap-2"> | ||
| <div className="h-8 w-32 animate-skeleton rounded-12 bg-gradient-to-r from-neutral-10 via-white-100 to-neutral-10 bg-[size:400%_400%]" /> | ||
| <div className="size-8 animate-skeleton rounded-12 bg-gradient-to-r from-neutral-10 via-white-100 to-neutral-10 bg-[size:400%_400%]" /> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| ) | ||
| } | ||
|
|
||
| export { AppCard, AppCardSkeleton } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| 'use client' | ||
|
|
||
| import { Button, ShortenAddress } from '@status-im/status-network/components' | ||
| import { ConnectKitButton } from 'connectkit' | ||
| import { useAccount } from 'wagmi' | ||
|
|
||
| import type { ComponentProps } from 'react' | ||
|
|
||
| type Props = { | ||
| size?: ComponentProps<typeof Button>['size'] | ||
| label?: string | ||
| } | ||
|
|
||
| const ConnectButton = (props: Props) => { | ||
| const { size = '32', label = 'Connect wallet' } = props | ||
|
|
||
| const { address, isConnected } = useAccount() | ||
|
|
||
| return ( | ||
| <ConnectKitButton.Custom> | ||
| {({ show }) => { | ||
| return ( | ||
| <Button | ||
| onClick={show} | ||
| variant={isConnected ? 'secondary' : 'primary'} | ||
| size={size} | ||
| > | ||
| {address && isConnected ? ( | ||
| <ShortenAddress address={address} /> | ||
| ) : ( | ||
| label | ||
| )} | ||
| </Button> | ||
| ) | ||
| }} | ||
| </ConnectKitButton.Custom> | ||
| ) | ||
| } | ||
|
|
||
| export { ConnectButton } | ||
| export type { Props as ConnectButtonProps } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| 'use client' | ||
|
|
||
| import { ConnectKitProvider as ConnectKit } from 'connectkit' | ||
|
|
||
| type ConnectKitProviderProps = { | ||
| children: React.ReactNode | ||
| } | ||
|
|
||
| export function ConnectKitProvider({ children }: ConnectKitProviderProps) { | ||
| return ( | ||
| <ConnectKit theme="auto" mode="light"> | ||
| {children} | ||
| </ConnectKit> | ||
| ) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| 'use client' | ||
|
|
||
| import { ConnectKitProvider } from './connectkit-provider' | ||
| import { QueryClientProvider } from './query-client-provider' | ||
| import { WagmiProvider } from './wagmi-provider' | ||
|
|
||
| interface ProvidersProps { | ||
| children: React.ReactNode | ||
| } | ||
|
|
||
| export function Providers({ children }: ProvidersProps) { | ||
| return ( | ||
| <WagmiProvider> | ||
| <QueryClientProvider> | ||
| <ConnectKitProvider>{children}</ConnectKitProvider> | ||
| </QueryClientProvider> | ||
| </WagmiProvider> | ||
| ) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| 'use client' | ||
|
|
||
| import { QueryClient, QueryClientProvider } from '@tanstack/react-query' | ||
|
|
||
| import type React from 'react' | ||
|
|
||
| const queryClient = new QueryClient({ | ||
| defaultOptions: { | ||
| queries: { | ||
| retry: false, | ||
| retryOnMount: false, | ||
| refetchOnMount: false, | ||
| refetchOnWindowFocus: false, | ||
| refetchOnReconnect: false, | ||
| }, | ||
| }, | ||
| }) | ||
|
|
||
| type Props = { | ||
| children: React.ReactNode | ||
| } | ||
|
|
||
| function _QueryClientProvider(props: Props) { | ||
| const { children } = props | ||
|
|
||
| return ( | ||
| <QueryClientProvider client={queryClient}>{children}</QueryClientProvider> | ||
| ) | ||
| } | ||
|
|
||
| export { _QueryClientProvider as QueryClientProvider } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| 'use client' | ||
|
|
||
| import { createConfig, http, WagmiProvider as WagmiProviderBase } from 'wagmi' | ||
| import { mainnet } from 'wagmi/chains' | ||
| import { injected } from 'wagmi/connectors' | ||
|
|
||
| import type React from 'react' | ||
|
|
||
| export const config = createConfig({ | ||
| chains: [mainnet], | ||
| ssr: false, | ||
| connectors: [injected()], | ||
| transports: { | ||
| // todo: replace public clients | ||
| [mainnet.id]: http(), | ||
| }, | ||
| }) | ||
|
|
||
| declare module 'wagmi' { | ||
| interface Register { | ||
| config: typeof config | ||
| } | ||
| } | ||
|
|
||
| type Props = { | ||
| children: React.ReactNode | ||
| } | ||
|
|
||
| function WagmiProvider(props: Props) { | ||
| const { children } = props | ||
|
|
||
| return ( | ||
| <WagmiProviderBase | ||
| config={ | ||
| config as unknown as React.ComponentProps< | ||
| typeof WagmiProviderBase | ||
| >['config'] | ||
| } | ||
| > | ||
| {children} | ||
| </WagmiProviderBase> | ||
| ) | ||
| } | ||
|
|
||
| export { config as wagmiConfig, WagmiProvider } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add two constants like DEFAULT_SIZE, DEFAULT_LABEL if we are picky