diff --git a/src/app/favicon.ico b/src/app/favicon.ico new file mode 100644 index 0000000..f2a19e7 Binary files /dev/null and b/src/app/favicon.ico differ diff --git a/src/applications/Profile/Ui/Settings/DeleteAccount.tsx b/src/applications/Profile/Ui/Settings/DeleteAccount.tsx index 3164e2f..be51586 100644 --- a/src/applications/Profile/Ui/Settings/DeleteAccount.tsx +++ b/src/applications/Profile/Ui/Settings/DeleteAccount.tsx @@ -75,7 +75,7 @@ export const SettingsDeleteAccount = () => { title: I understand, delete my account, fullWidth: true, color: "danger", - isDisabled: !form.watch("confirm")?.match("delete my account") + isDisabled: !form.watch("confirm")?.match(t(i18n)`delete my account`) }, wrapper: ModalFooter, wrapperProps: { className: "justify-end border-t border-t-default -px-4" } diff --git a/src/applications/Profile/Ui/Settings/DisplayName.tsx b/src/applications/Profile/Ui/Settings/DisplayName.tsx index fc27bc7..b4f33b6 100644 --- a/src/applications/Profile/Ui/Settings/DisplayName.tsx +++ b/src/applications/Profile/Ui/Settings/DisplayName.tsx @@ -13,7 +13,7 @@ interface SettingsDisplayNameProps { } export const SettingsDisplayName = ({ defaultValue }: SettingsDisplayNameProps) => { - const form = useForm<{ fullname: string }>(); + const form = useForm<{ fullname: string }>(undefined, { defaultValues: { fullname: defaultValue } }); const { i18n } = useLingui(); const notify = () => toast(Fullname updated, { diff --git a/src/applications/Profile/Ui/Settings/PhoneNumber.tsx b/src/applications/Profile/Ui/Settings/PhoneNumber.tsx index 83f09d1..cce0918 100644 --- a/src/applications/Profile/Ui/Settings/PhoneNumber.tsx +++ b/src/applications/Profile/Ui/Settings/PhoneNumber.tsx @@ -14,7 +14,7 @@ interface SettingsPhoneNumberProps { } export const SettingsPhoneNumber = ({ defaultValue }: SettingsPhoneNumberProps) => { - const form = useForm<{ phone: string }>(); + const form = useForm<{ phone: string }>(undefined, { defaultValues: { phone: defaultValue } }); const { i18n } = useLingui(); const notify = () => toast(Phone number updated, { diff --git a/src/components/Toast/Toast.tsx b/src/components/Toast/Toast.tsx index fd137c3..249efe4 100644 --- a/src/components/Toast/Toast.tsx +++ b/src/components/Toast/Toast.tsx @@ -1,9 +1,10 @@ "use client"; +import dynamic from "next/dynamic"; import { Bounce, ToastContainer } from "react-toastify"; import { useTheme } from "~/hooks/useTheme"; -export const Toast = () => { +const ToastComponent = () => { const { activeTheme } = useTheme(); return ( @@ -25,3 +26,7 @@ export const Toast = () => { /> ); }; + +export const Toast = dynamic(() => Promise.resolve(ToastComponent), { + ssr: false +}); diff --git a/src/translations/messages/en.po b/src/translations/messages/en.po index 98d1813..6d26314 100644 --- a/src/translations/messages/en.po +++ b/src/translations/messages/en.po @@ -53,6 +53,7 @@ msgstr "Dark" msgid "Delete Account" msgstr "Delete Account" +#: src/applications/Profile/Ui/Settings/DeleteAccount.tsx #: src/applications/Profile/Ui/Settings/DeleteAccount.tsx msgid "delete my account" msgstr "delete my account" @@ -131,10 +132,12 @@ msgid "Please enter your full name, or a display name you are comfortable with." msgstr "Please enter your full name, or a display name you are comfortable with." #: src/applications/Profile/Ui/Settings/DisplayName.tsx +#: src/applications/Profile/Ui/Settings/PhoneNumber.tsx msgid "Please use 32 characters at maximum." msgstr "Please use 32 characters at maximum." #: src/applications/Profile/Ui/Settings/DisplayName.tsx +#: src/applications/Profile/Ui/Settings/PhoneNumber.tsx msgid "Save" msgstr "Save" diff --git a/src/translations/messages/fr.po b/src/translations/messages/fr.po index fe32477..bcfb801 100644 --- a/src/translations/messages/fr.po +++ b/src/translations/messages/fr.po @@ -53,6 +53,7 @@ msgstr "Sombre" msgid "Delete Account" msgstr "Supprimer mon compte" +#: src/applications/Profile/Ui/Settings/DeleteAccount.tsx #: src/applications/Profile/Ui/Settings/DeleteAccount.tsx msgid "delete my account" msgstr "supprimer mon compte" @@ -131,10 +132,12 @@ msgid "Please enter your full name, or a display name you are comfortable with." msgstr "Veuillez entrer votre nom complet, ou un nom d'affichage avec lequel vous êtes à l'aise" #: src/applications/Profile/Ui/Settings/DisplayName.tsx +#: src/applications/Profile/Ui/Settings/PhoneNumber.tsx msgid "Please use 32 characters at maximum." msgstr "Veuillez utiliser 32 caractères maximum." #: src/applications/Profile/Ui/Settings/DisplayName.tsx +#: src/applications/Profile/Ui/Settings/PhoneNumber.tsx msgid "Save" msgstr "Sauvegarder"