## Summary - Removed legacy behavior from Link components - Fixed onClick warnings with next-intl Link wrapper - Fixed tab switching on party page - Fixed JobSkillItem router undefined error ## Changes - Removed `legacyBehavior` prop and nested `<a>` tags from all Link components - Updated GridTabsCompact to use next-intl's Link wrapper correctly - Fixed PartyPageClient tab switching by mapping string values to GridType enum - Removed broken locale assignment code in JobSkillItem ## Test plan - [x] No more console warnings about onClick and legacyBehavior - [x] Tab switching works correctly on party page - [x] No router undefined errors in JobSkillItem - [x] All navigation links work as expected 🤖 Generated with [Claude Code](https://claude.ai/code) --------- Co-authored-by: Claude <noreply@anthropic.com>
34 lines
797 B
TypeScript
34 lines
797 B
TypeScript
import { ComponentProps } from 'react'
|
|
import classNames from 'classnames'
|
|
|
|
import ShareIcon from '~public/icons/Share.svg'
|
|
import styles from './index.module.scss'
|
|
|
|
interface Props extends ComponentProps<'div'> {
|
|
title: string
|
|
link: string
|
|
icon: React.ReactNode
|
|
}
|
|
|
|
const LinkItem = ({ icon, title, link, className, ...props }: Props) => {
|
|
const classes = classNames(
|
|
{
|
|
[styles.item]: true,
|
|
},
|
|
className?.split(' ').map((c) => styles[c])
|
|
)
|
|
|
|
return (
|
|
<div className={classes}>
|
|
<a href={link} target="_blank" rel="noreferrer">
|
|
<div className={styles.left}>
|
|
<i className={styles.icon}>{icon}</i>
|
|
<h3>{title}</h3>
|
|
</div>
|
|
<ShareIcon className={styles.shareIcon} />
|
|
</a>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default LinkItem
|