- Update all component imports from useTranslation to useTranslations - Replace react-i18next and next-i18next imports with next-intl - Convert Trans components to t.rich() for rich text formatting - Update all translation hook usage to next-intl API This affects 80+ component files across the codebase including: - Character, weapon, summon components - Auth modals (login, signup, account) - Party management components - Filter and search components - Toast notifications - About pages and content updates 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
58 lines
1.2 KiB
TypeScript
58 lines
1.2 KiB
TypeScript
import React from 'react'
|
|
import { useTranslations } from 'next-intl'
|
|
import Alert from '~components/common/Alert'
|
|
|
|
interface Props {
|
|
creator: boolean
|
|
name: string
|
|
open: boolean
|
|
remixCallback: () => void
|
|
onOpenChange: (open: boolean) => void
|
|
}
|
|
|
|
const RemixTeamAlert = ({
|
|
creator,
|
|
name,
|
|
open,
|
|
remixCallback,
|
|
onOpenChange,
|
|
}: Props) => {
|
|
const t = useTranslations('common')
|
|
|
|
function remixParty() {
|
|
remixCallback()
|
|
}
|
|
|
|
function close() {
|
|
onOpenChange(false)
|
|
}
|
|
|
|
return (
|
|
<Alert
|
|
open={open}
|
|
primaryAction={remixParty}
|
|
primaryActionText={t('modals.remix_team.buttons.confirm')}
|
|
cancelAction={close}
|
|
cancelActionText={t('modals.remix_team.buttons.cancel')}
|
|
message={
|
|
creator ? (
|
|
<>
|
|
{t.rich('modals.remix_team.description.creator', {
|
|
name: name,
|
|
strong: (chunks) => <strong>{chunks}</strong>
|
|
})}
|
|
</>
|
|
) : (
|
|
<>
|
|
{t.rich('modals.remix_team.description.viewer', {
|
|
name: name,
|
|
strong: (chunks) => <strong>{chunks}</strong>
|
|
})}
|
|
</>
|
|
)
|
|
}
|
|
/>
|
|
)
|
|
}
|
|
|
|
export default RemixTeamAlert
|