hensei-web/components/toasts/UrlCopiedToast/index.tsx
Justin Edmund b34cc8a4eb refactor: migrate all components from next-i18next to next-intl
- 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>
2025-09-02 19:48:04 -07:00

37 lines
783 B
TypeScript

import React from 'react'
import Toast from '~components/common/Toast'
import { useTranslations } from 'next-intl'
interface Props {
open: boolean
onActionClick?: () => void
onOpenChange: (open: boolean) => void
onCloseClick: () => void
}
const UrlCopiedToast = ({ open, onOpenChange, onCloseClick }: Props) => {
const t = useTranslations('common')
// Methods: Event handlers
function handleOpenChange() {
onOpenChange(open)
}
function handleCloseClick() {
onCloseClick()
}
return (
<Toast
altText={t('toasts.copied')}
open={open}
duration={2400}
type="foreground"
content={t('toasts.copied')}
onOpenChange={handleOpenChange}
onCloseClick={handleCloseClick}
/>
)
}
export default UrlCopiedToast