Project is built mainly with
nextjs
,react server component
andprisma
.
See Contributing for installation.
GraphQL api support with codegen is available at https://github.com/prisma-korea/prisma-nextjs-rsc/pulls.
// en.json
"home": {
"intro": "Hello my name is {{ name }} and {{ age }} years old"
},
const {t, home} = await getTranslates(lang);
// app/[lang]/page.tsx
export default async function Page({
params: {lang},
}: Props): Promise<ReactElement> {
const {t, langs, nav, home} = await getTranslates(lang);
return (
<Container lang={lang} langs={langs} t={nav}>
<div className={clsx('flex-1 bg-paper', 'flex flex-col')}>
<p className={clsx('p-8 text-basic')}>
{t(home.intro, {name: 'kihun', age: 30})}
</p>
</div>
</Container>
);
}