Skip to content

Commit

Permalink
ready to use
Browse files Browse the repository at this point in the history
  • Loading branch information
KishiTheMechanic committed Oct 27, 2024
1 parent 1bd1721 commit e6973ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export const handler = define.handlers({
})

export default define.page<typeof handler>(function Home(props) {
const { t } = createTranslator(props.state.translationData)
const t = createTranslator(props.state.translationData)
return (
<div>
{t('common.title')} // Home or ホーム
Expand Down Expand Up @@ -246,7 +246,7 @@ export function useTranslation() {
return typeof result === 'string' ? result : '' // Return the result if it's a string
}

return { t }
return t
}
```

Expand Down Expand Up @@ -292,7 +292,7 @@ import { usePathname } from '@/hooks/i18n/usePathname.ts'
import { useLocale } from '@/hooks/i18n/useLocale.ts'

export default function IslandsComponent() {
const { t } = useTranslation()
const t = useTranslation()
const path = usePathname()
const { locale } = useLocale()

Expand Down
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@elsoul/fresh-i18n",
"version": "0.9.12",
"version": "1.0.0",
"description": "A simple and flexible internationalization (i18n) plugin for Deno's Fresh framework.",
"runtimes": ["deno", "browser"],
"exports": "./mod.ts",
Expand Down

0 comments on commit e6973ba

Please sign in to comment.