Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
athevinha committed Sep 18, 2024
1 parent d119727 commit da7e5bc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/_mock/arrays/_user.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {formatAddress} from 'src/utils/formatAddress';
import _mock from '../_mock';
import { randomNumberRange, randomInArray } from '../utils';
import DN404Medias from "../../DN404.media.json"
Expand Down Expand Up @@ -52,7 +53,7 @@ export const _userFeeds = [...Array(20)].map((_, index) => ({
author: {
id: _mock.id(8),
avatarUrl: randomInArray(DN404Medias),
name: 'Caitlyn Kerluke',
name: 'david.ens.laicos',
},
isLiked: true,
createdAt: _mock.time(index),
Expand All @@ -68,7 +69,7 @@ export const _userFeeds = [...Array(20)].map((_, index) => ({
author: {
id: _mock.id(8),
avatarUrl: randomInArray(DN404Medias),
name: _mock.name.fullName(index + 5),
name: formatAddress('0xa371D544318AA431a3ABAD9702B10B20029bd977'),
},
createdAt: _mock.time(2),
message: 'Praesent venenatis metus at',
Expand All @@ -78,7 +79,7 @@ export const _userFeeds = [...Array(20)].map((_, index) => ({
author: {
id: _mock.id(10),
avatarUrl: randomInArray(DN404Medias),
name: _mock.name.fullName(index + 6),
name: formatAddress('0xdEc91a05108713067ee6BaB1A999381623E5c0AE'),
},
createdAt: _mock.time(3),
message:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export default function ProfilePostCard({ post }: Props) {
const theme = useTheme();
const { products, checkout } = useSelector((state) => state.product);
const product = randomInArray(products || []);
const linkTo = PATH_DASHBOARD.dn404.view(paramCase(product?.name || ''));
const linkTo = PATH_DASHBOARD.dn404.view(paramCase(product?.name || 'sophisticated-brogues'));
const hasComments = post.comments.length > 0;

const handleLike = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/formatAddress.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const formatAddress = (address?: string ) => {
if(!address) return '';
return `${address.slice(0,5)}...${address.slice(-5,100000)}`
return `${address.slice(0,7)}...${address.slice(-7,100000)}`
}

0 comments on commit da7e5bc

Please sign in to comment.