- 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>
35 lines
812 B
TypeScript
35 lines
812 B
TypeScript
import React from 'react'
|
|
import { useTranslations } from 'next-intl'
|
|
import Alert from '~components/common/Alert'
|
|
|
|
interface Props {
|
|
open: boolean
|
|
deleteCallback: () => void
|
|
onOpenChange: (open: boolean) => void
|
|
}
|
|
|
|
const DeleteTeamAlert = ({ open, deleteCallback, onOpenChange }: Props) => {
|
|
const t = useTranslations('common')
|
|
|
|
function deleteParty() {
|
|
deleteCallback()
|
|
}
|
|
|
|
function close() {
|
|
onOpenChange(false)
|
|
}
|
|
|
|
return (
|
|
<Alert
|
|
open={open}
|
|
primaryAction={deleteParty}
|
|
primaryActionClassName="Destructive"
|
|
primaryActionText={t('modals.delete_team.buttons.confirm')}
|
|
cancelAction={close}
|
|
cancelActionText={t('modals.delete_team.buttons.cancel')}
|
|
message={t('modals.delete_team.description')}
|
|
/>
|
|
)
|
|
}
|
|
|
|
export default DeleteTeamAlert
|