Skip to content

Commit

Permalink
Refactor Profile badges to use badge name as key instead of nanoid
Browse files Browse the repository at this point in the history
  • Loading branch information
chimpdev committed May 3, 2024
1 parent 50d7cf6 commit 0e76070
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions client/app/(profiles)/profile/[slug]/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import Social from '@/app/(profiles)/profile/[slug]/components/sections/Social';
import About from '@/app/(profiles)/profile/[slug]/components/sections/About';
import Actions from '@/app/(profiles)/profile/[slug]/components/sections/Actions';
import incrementViews from '@/lib/request/profiles/incrementViews';
import { nanoid } from 'nanoid';
import Tooltip from '@/app/components/Tooltip';
import { useEffect } from 'react';
import Servers from '@/app/(profiles)/profile/[slug]/components/sections/Servers';
Expand Down Expand Up @@ -66,7 +65,7 @@ export default function Content({ profile }) {
{profile.badges.length > 0 && (
<div className='flex items-center ml-4 gap-x-2'>
{profile.badges.map(badge => (
<Tooltip key={nanoid()} content={badge}>
<Tooltip key={badge} content={badge}>
<MotionImage
src={`/profile-badges/${badge.toLowerCase()}.svg`}
width={24}
Expand Down

0 comments on commit 0e76070

Please sign in to comment.