Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
343547b
✨ feat: sign in call endpoint
MarioBatalha Mar 31, 2025
9b29747
♻️ refactor: sign in call endpoint
MarioBatalha Mar 31, 2025
208cf31
♻️ refactor: remove console log
MarioBatalha Mar 31, 2025
d703dfe
♻️ refactor: remove console log
MarioBatalha Mar 31, 2025
3fc0359
:construction: feat: refactor in login integration
KipandaJr Apr 1, 2025
061a0a8
:construction: wip: pools integration
atilasousa Apr 1, 2025
5d900d5
🐛 fix: sign out call endpoint
MarioBatalha Apr 2, 2025
d37fc22
🐛 fix: sign out call endpoint
MarioBatalha Apr 2, 2025
fedaf4f
Merge branch 'feat/sign-in-call-endpoint' of https://github.com/inter…
MarioBatalha Apr 2, 2025
3b598b2
✨ feat: add scheduleTimeToDisconnect function
MarioBatalha Apr 3, 2025
054ab8f
Merge branch 'develop' of https://github.com/interest-protocol/memez.…
MarioBatalha Apr 6, 2025
9d0edee
♻️ refactor: auth flow and validate connected wallet
MarioBatalha Apr 6, 2025
6fc4fe3
:construction: wip: pools integration
atilasousa Apr 7, 2025
e9d9de9
:sparkles: feat: adding pool metadata
atilasousa Apr 7, 2025
e3f6cca
:construction: wip: pools integration
atilasousa Apr 8, 2025
d358da9
:sparkles: feat: adding pools vol
atilasousa Apr 8, 2025
6b31169
:sparkles: feat: adding pool likes
atilasousa Apr 9, 2025
22165d7
:bug: fix: likes total items
atilasousa Apr 10, 2025
1ff066d
:construction: feat: wip
KipandaJr Apr 10, 2025
91932ff
:sparkles: feat: adding liking pools
atilasousa Apr 10, 2025
cf19fa4
:bug: fix: removing types
atilasousa Apr 10, 2025
cf1636c
:bug: fix: layout fixes
atilasousa Apr 11, 2025
b7ca764
:sparkles: feat: adding new load more button
atilasousa Apr 11, 2025
4ba33c9
:bug: fix: conflicts
atilasousa Apr 13, 2025
49ca311
:bug: fix: adding likes in details
atilasousa Apr 13, 2025
fa6e68c
:bug: fix: pool likes
atilasousa Apr 14, 2025
7adde1e
:bug: fix: likes
atilasousa Apr 14, 2025
c028e76
:bug: fix: number of likes
atilasousa Apr 14, 2025
5ecffe2
:bug: fix: number of likes fixed
atilasousa Apr 14, 2025
1284edf
:bug: fix: socials
atilasousa Apr 14, 2025
cf337ce
:sparkles: feat: adding not found pool
atilasousa Apr 15, 2025
30ea652
:bug: fix: loading on usePool
atilasousa Apr 15, 2025
dc28225
:bug: fix: merge with develop
atilasousa Apr 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
NEXT_PUBLIC_NETWORK=testnet
NEXT_PUBLIC_NETWORK=testnet
NEXT_METADATA_API=https://coin-metadata-api-testnet-staging.up.railway.app
NEXT_PUBLIC_GRAPHQL_URI=https://pump-memez-api-staging.up.railway.app/graphql
NEXT_PUBLIC_BASE_URL=https://api.staging.memez.interestlabs.io/v1
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
NEXT_PUBLIC_NETWORK=NETWORK
NEXT_PUBLIC_AUTH_URL=AUTH_ENDPOINT
8 changes: 8 additions & 0 deletions api/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { ApolloClient, InMemoryCache } from '@apollo/client';

const GRAPHQL_URL = process.env.NEXT_PUBLIC_GRAPHQL_URI || '';

export const graphQLClient = new ApolloClient({
cache: new InMemoryCache(),
uri: GRAPHQL_URL,
});
35 changes: 21 additions & 14 deletions components/avatar-group/avatar-group.data.ts
Original file line number Diff line number Diff line change
@@ -1,30 +1,37 @@
export const DATA = [
{
title: 'Alice',
imgSrc: 'https://i.pravatar.cc/150?img=1',
id: '1',
name: 'Alice',
avatar: 'https://i.pravatar.cc/150?img=1',
},
{
title: 'Bob',
imgSrc: 'https://i.pravatar.cc/150?img=2',
id: '1',
name: 'Bob',
avatar: 'https://i.pravatar.cc/150?img=2',
},
{
title: 'Charlie',
imgSrc: 'https://i.pravatar.cc/150?img=3',
id: '1',
name: 'Charlie',
avatar: 'https://i.pravatar.cc/150?img=3',
},
{
title: 'David',
imgSrc: 'https://i.pravatar.cc/150?img=4',
id: '1',
name: 'David',
avatar: 'https://i.pravatar.cc/150?img=4',
},
{
title: 'Emma',
imgSrc: 'https://i.pravatar.cc/150?img=5',
id: '1',
name: 'Emma',
avatar: 'https://i.pravatar.cc/150?img=5',
},
{
title: 'Frank',
imgSrc: 'https://i.pravatar.cc/150?img=6',
id: '1',
name: 'Frank',
avatar: 'https://i.pravatar.cc/150?img=6',
},
{
title: 'Grace',
imgSrc: 'https://i.pravatar.cc/150?img=7',
id: '1',
name: 'Grace',
avatar: 'https://i.pravatar.cc/150?img=7',
},
];
5 changes: 3 additions & 2 deletions components/avatar-group/avatar/avatar.types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { MouseEvent } from 'react';
export interface AvatarProps {
title: string;
imgSrc?: string;
id: string;
avatar?: string;
username: string;
isVerified?: boolean;
size?: 'small' | 'medium' | 'large';
onClick?: (e: MouseEvent<HTMLDivElement>) => void;
Expand Down
6 changes: 3 additions & 3 deletions components/avatar-group/avatar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { VerifiedSVG } from '../../svg';
import { AvatarProps } from './avatar.types';

const Avatar: FC<AvatarProps> = ({
title,
imgSrc,
name,
avatar,
onClick,
isVerified,
size = 'small',
Expand Down Expand Up @@ -43,7 +43,7 @@ const Avatar: FC<AvatarProps> = ({
height={avatarSize}
justifyContent="center"
>
<Img src={imgSrc} alt={title} width="100%" height="100%" />
<Img src={avatar} alt={name} width="100%" height="100%" />
</Div>
{isVerified && (
<Div
Expand Down
13 changes: 7 additions & 6 deletions components/avatar-group/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ import { TooltipWrapper } from '../tooltip';
import Avatar from './avatar';
import { AvatarGroupProps } from './avatar-group.types';

const MAX_ITEMS = 5;

const AvatarGroup: FC<AvatarGroupProps> = ({ items }) => {
const MAX_ITEMS = 5;
const { setContent, onClose } = useModal();

const handleClick = (e: MouseEvent<HTMLDivElement>) => {
Expand All @@ -24,12 +25,12 @@ const AvatarGroup: FC<AvatarGroupProps> = ({ items }) => {

return (
<Div gap="0.5rem" display="flex" cursor="pointer" color="#F6C853">
{items.slice(0, MAX_ITEMS).map(({ title, imgSrc }) => (
<TooltipWrapper key={v4()} tooltipContent={title}>
{items.slice(0, MAX_ITEMS).map(({ id, username, avatar }) => (
<TooltipWrapper key={v4()} tooltipContent={username}>
<Avatar
isVerified
title={title}
imgSrc={imgSrc}
id={id}
avatar={avatar}
username={username}
onClick={handleAvatarClick}
/>
</TooltipWrapper>
Expand Down
9 changes: 5 additions & 4 deletions components/engagement-counter/engagement-counter-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ import { ArrowUpRightFromSquareSVG } from '../svg';
import { EngagementCounterModalItemProps } from './engagement-counter.types';

const EngagementCounterModalItem: FC<EngagementCounterModalItemProps> = ({
userName,
userAvatar,
id,
name,
avatar,
}) => {
return (
<Div
Expand All @@ -24,9 +25,9 @@ const EngagementCounterModalItem: FC<EngagementCounterModalItemProps> = ({
}}
>
<Div gap="1rem" display="flex" alignItems="center">
<Avatar imgSrc={userAvatar} title={userName} size="large" isVerified />
<Avatar id={id} isVerified size="large" name={name} avatar={avatar} />
<Span color="#E4E7EB" fontSize="1rem">
{userName}
{name}
</Span>
</Div>
<Div cursor="pointer">
Expand Down
5 changes: 3 additions & 2 deletions components/engagement-counter/engagement-counter.types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export interface EngagementCounterModalItemProps {
userName: string;
userAvatar: string;
id: string;
name: string;
avatar: string;
}

export interface EngagementCounterModalProps {
Expand Down
5 changes: 3 additions & 2 deletions components/engagement-counter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ const EngagementCounterModal: FC<EngagementCounterModalProps> = ({ title }) => {
{DATA.map(({ userName, userAvatar }) => (
<UserLikeItem
key={v4()}
userName={userName}
userAvatar={userAvatar}
id={v4()}
name={userName}
avatar={userAvatar}
/>
))}
</Div>
Expand Down
6 changes: 3 additions & 3 deletions components/filter-button/filter-button-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { FC } from 'react';

import { FilterButtonItemProps } from './filter-button.types';

const FilterButtonItem: FC<FilterButtonItemProps> = ({ title, onClick }) => {
const FilterButtonItem: FC<FilterButtonItemProps> = ({ item, onClick }) => {
const handleClick = () => {
onClick(title);
onClick(item);
};

return (
Expand All @@ -19,7 +19,7 @@ const FilterButtonItem: FC<FilterButtonItemProps> = ({ title, onClick }) => {
onClick={handleClick}
nHover={{ backgroundColor: '#2f343bce' }}
>
{title}
{item.label}
</Div>
);
};
Expand Down
7 changes: 2 additions & 5 deletions components/filter-button/filter-button.data.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
export const SORT_OPTIONS = [
{ label: 'Relevance', value: 'relevance' },
{ label: 'Market Cap', value: 'market_cap' },
{ label: 'Bump Order', value: 'bump_order' },
{ label: '24h Volume', value: '24h_volume' },
{ label: 'All time Volume', value: 'all_time_volume' },
{ label: 'Default', value: 'default' },
{ label: 'Market Cap', value: 'quoteBalance' },
];
14 changes: 12 additions & 2 deletions components/filter-button/filter-button.types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
export interface FilterButtonProps {
currentFilter: SortItem;
setFilter: (sortItem: SortItem) => void;
}

export interface FilterButtonItemProps {
title: string;
onClick: (value: string) => void;
item: SortItem;
onClick: (sortItem: SortItem) => void;
}

export interface SortItem {
label: string;
value: string;
}
16 changes: 9 additions & 7 deletions components/filter-button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import useClickOutsideListenerRef from '@/hooks/use-click-outside-listener-ref';

import { ArrowDownSVG, FiltersSVG } from '../svg';
import { SORT_OPTIONS } from './filter-button.data';
import { FilterButtonProps, SortItem } from './filter-button.types';
import FilterButtonItem from './filter-button-item';

const FilterButton: FC = () => {
const [currentFilter, setCurrentFilter] = useState('Relevance');
const FilterButton: FC<FilterButtonProps> = ({ setFilter, currentFilter }) => {
const [isDropdownOpen, setIsDropDownOpen] = useState(false);
const boxId = useId();

Expand All @@ -33,12 +33,14 @@ const FilterButton: FC = () => {
setIsDropDownOpen(!isDropdownOpen);
};

const handleFilterSelect = (value: string) => {
setCurrentFilter(value);
const handleFilterSelect = (sortItem: SortItem) => {
setFilter(sortItem);
setIsDropDownOpen(false);
};

const filteredItems = SORT_OPTIONS.filter((el) => el.label !== currentFilter);
const filteredItems = SORT_OPTIONS.filter(
(el) => el.value !== currentFilter.value
);

const dropdownRef = useClickOutsideListenerRef<HTMLDivElement>(closeDropdown);

Expand All @@ -65,7 +67,7 @@ const FilterButton: FC = () => {
justifyContent="center"
display={['none', 'none', 'none', 'flex', 'flex']}
>
{currentFilter}
{currentFilter.label}
<ArrowDownSVG maxHeight="0.9rem" maxWidth="0.9rem" width="0.9rem" />
</Div>
<Div display={['flex', 'flex', 'flex', 'none', 'none']}>
Expand Down Expand Up @@ -93,7 +95,7 @@ const FilterButton: FC = () => {
{filteredItems.map((el) => (
<FilterButtonItem
key={v4()}
title={el.label}
item={el}
onClick={handleFilterSelect}
/>
))}
Expand Down
59 changes: 47 additions & 12 deletions components/hero/hero-carousel-item.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
import { Div, Span } from '@stylin.js/elements';
import { FC } from 'react';
import Skeleton from 'react-loading-skeleton';

import { formatNumber } from '@/utils';

import { HeroCarouselItemProps } from './hero-carousel.types';
import HeroCarouselItemTokenIcon from './hero-carousel-item-token-icon';
import HeroCarouselItemTokenIconSkeleton from './hero-skeletons/hero-carousel-item-token-icon-skeleton';
import HeroFloatItemSkeleton from './hero-skeletons/hero-float-item-skeleton';
import HoverFloatItem from './hover-float-item';

const HeroCarouselItem: FC<HeroCarouselItemProps> = ({
name,
isHot,
iconUrl,
iconSize,
isLoading,
marketCap,
volume24h,
tokenName,
allTimeVolume,
}) => {
return (
Expand All @@ -35,14 +41,25 @@ const HeroCarouselItem: FC<HeroCarouselItemProps> = ({
mr={['unset', 'unset', 'unset', '2rem', '5rem']}
display={['none', 'none', 'none', 'block', 'block']}
>
<HoverFloatItem value={marketCap} labelKey="marketCap" />
{isLoading ? (
<HeroFloatItemSkeleton />
) : (
<HoverFloatItem
labelKey="marketCap"
value={formatNumber(marketCap)}
/>
)}
</Div>
<Div mr={['unset', 'unset', 'unset', '5rem', '5rem']}>
<HeroCarouselItemTokenIcon
isHot={isHot}
size={iconSize}
iconUrl={iconUrl}
/>
{!isLoading ? (
<HeroCarouselItemTokenIcon
isHot={isHot}
size={iconSize}
iconUrl={iconUrl}
/>
) : (
<HeroCarouselItemTokenIconSkeleton />
)}
</Div>
</Div>
</Div>
Expand All @@ -55,9 +72,13 @@ const HeroCarouselItem: FC<HeroCarouselItemProps> = ({
justifyContent="center"
display={['none', 'none', 'none', 'flex', 'flex']}
>
<Span fontFamily="GoodGame" fontSize="6rem">
{tokenName}
</Span>
{isLoading ? (
<Skeleton height="5.688rem" width="21.813rem" />
) : (
<Span fontFamily="GoodGame" fontSize="6rem">
{name}
</Span>
)}
</Div>
<Div flex="2" height="100%" display="flex" justifyContent="flex-start">
<Div
Expand All @@ -73,15 +94,29 @@ const HeroCarouselItem: FC<HeroCarouselItemProps> = ({
ml={['5rem', '5rem', '5rem', '-5rem', '5rem']}
display={['none', 'none', 'none', 'block', 'block']}
>
<HoverFloatItem value={volume24h} labelKey="volume24h" />
{isLoading ? (
<HeroFloatItemSkeleton />
) : (
<HoverFloatItem
value={formatNumber(Number(volume24h))}
labelKey="volume24h"
/>
)}
</Div>
<Div
height="100%"
alignItems="flex-start"
display={['none', 'none', 'none', 'flex', 'flex']}
>
<Div mt="6rem">
<HoverFloatItem value={allTimeVolume} labelKey="allTimeVolume" />
{isLoading ? (
<HeroFloatItemSkeleton />
) : (
<HoverFloatItem
value={formatNumber(Number(allTimeVolume))}
labelKey="allTimeVolume"
/>
)}
</Div>
</Div>
</Div>
Expand Down
Loading