feat(frontend): locale for dates and tooltip for copy link button (#492)
* Add tooltip for copy button * Set locale globally for moment.js * format * remove debugging log * refactor: rename translation key --------- Co-authored-by: Elias Schneider <login@eliasschneider.com>
This commit is contained in:
@@ -29,6 +29,8 @@ import Config from "../types/config.type";
|
||||
import { CurrentUser } from "../types/user.type";
|
||||
import i18nUtil from "../utils/i18n.util";
|
||||
import userPreferences from "../utils/userPreferences.util";
|
||||
import "moment/min/locales";
|
||||
import moment from "moment";
|
||||
|
||||
const excludeDefaultLayoutRoutes = ["/admin/config/[category]"];
|
||||
|
||||
@@ -84,6 +86,7 @@ function App({ Component, pageProps }: AppProps) {
|
||||
};
|
||||
|
||||
const language = useRef(pageProps.language);
|
||||
moment.locale(language.current);
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user