Update "Password Reset" to "Update Password"

The code changes correspond to the rebranding of "Password Reset" to "Update Password". The names of components, functions, and routes have been updated to reflect this change. Also, a minor code optimization has been made in the i18n.server file for the creation of i18n server instances.
This commit is contained in:
giancarlo
2024-04-19 17:27:11 +08:00
parent cc80b26117
commit c121a3bdad
5 changed files with 15 additions and 10 deletions

View File

@@ -1,3 +1,5 @@
import { cache } from 'react';
import { cookies, headers } from 'next/headers';
import {
@@ -21,7 +23,7 @@ import { i18nResolver } from './i18n.resolver';
*
* Initialize the i18n instance for every RSC server request (eg. each page/layout)
*/
export function createI18nServerInstance() {
function createInstance() {
const acceptLanguage = headers().get('accept-language');
const cookie = cookies().get(I18N_COOKIE_NAME)?.value;
@@ -42,3 +44,5 @@ export function createI18nServerInstance() {
return initializeServerI18n(settings, i18nResolver);
}
export const createI18nServerInstance = cache(createInstance);