Replies: 2 comments 8 replies
-
Getting the types for The linked example code looks like this: async function getSchema() {
// This is an example of a i18n setup.
const t = await getTranslations();
return mySchema(t); // this is the schema that will be used to validate and parse the input
} What is the implementation of /cc @TheEdoRan |
Beta Was this translation helpful? Give feedback.
-
I'm thinking of using something like https://nextjs.org/docs/pages/building-your-application/optimizing/lazy-loading#with-external-libraries to conditionnaly use getTranslations or useTranslations depending on we are on server or client side. By checking |
Beta Was this translation helpful? Give feedback.
-
Hello, I would like to use https://next-safe-action.dev/docs/recipes/i18n as you can see you're injecting the translate function.
Is there any way to get the proper type of this function (on server and client ? getTranslations and useTranslations ?) for something isomorphic ?
I would like to reuse the schema on client and server side.
Beta Was this translation helpful? Give feedback.
All reactions