- {changingPassword ? "Modification..." : "Modifier le mot de passe"}
+ {changingPassword
+ ? "Modification..."
+ : "Modifier le mot de passe"}
@@ -443,4 +494,3 @@ export default function ProfileForm({
);
}
-
diff --git a/components/WebpackErrorHandler.tsx b/components/WebpackErrorHandler.tsx
new file mode 100644
index 0000000..634ea20
--- /dev/null
+++ b/components/WebpackErrorHandler.tsx
@@ -0,0 +1,84 @@
+"use client";
+
+import { useEffect } from "react";
+
+export default function WebpackErrorHandler() {
+ useEffect(() => {
+ // Listen for unhandled errors
+ const handleError = (event: ErrorEvent) => {
+ const error = event.error || event.message || "";
+ const errorString = String(error);
+
+ // Check if it's a webpack module loading error
+ if (
+ errorString.includes("Cannot read properties of undefined") &&
+ (errorString.includes("reading 'call'") ||
+ errorString.includes("webpack") ||
+ errorString.includes("react-server-dom-webpack"))
+ ) {
+ console.warn(
+ "Webpack module loading error detected, forcing page reload..."
+ );
+
+ // Clear all caches and reload
+ if (typeof window !== "undefined") {
+ // Clear service worker cache if exists
+ if ("serviceWorker" in navigator) {
+ navigator.serviceWorker.getRegistrations().then((registrations) => {
+ registrations.forEach((registration) => {
+ registration.unregister();
+ });
+ });
+ }
+
+ // Clear all caches
+ if ("caches" in window) {
+ caches.keys().then((names) => {
+ names.forEach((name) => {
+ caches.delete(name);
+ });
+ });
+ }
+
+ // Force hard reload after a short delay
+ setTimeout(() => {
+ window.location.reload();
+ }, 100);
+ }
+ }
+ };
+
+ // Listen for unhandled promise rejections
+ const handleRejection = (event: PromiseRejectionEvent) => {
+ const error = event.reason || "";
+ const errorString = String(error);
+
+ if (
+ errorString.includes("Cannot read properties of undefined") &&
+ (errorString.includes("reading 'call'") ||
+ errorString.includes("webpack") ||
+ errorString.includes("react-server-dom-webpack"))
+ ) {
+ console.warn(
+ "Webpack module loading error detected in promise, forcing page reload..."
+ );
+
+ if (typeof window !== "undefined") {
+ setTimeout(() => {
+ window.location.reload();
+ }, 100);
+ }
+ }
+ };
+
+ window.addEventListener("error", handleError);
+ window.addEventListener("unhandledrejection", handleRejection);
+
+ return () => {
+ window.removeEventListener("error", handleError);
+ window.removeEventListener("unhandledrejection", handleRejection);
+ };
+ }, []);
+
+ return null;
+}
diff --git a/next.config.js b/next.config.js
index 159d810..91ef62f 100644
--- a/next.config.js
+++ b/next.config.js
@@ -1,7 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
-}
-
-module.exports = nextConfig
+};
+module.exports = nextConfig;
diff --git a/public/avatar-1.jpg b/public/avatar-1.jpg
new file mode 100644
index 0000000..8806c27
Binary files /dev/null and b/public/avatar-1.jpg differ
diff --git a/public/avatar-2.jpg b/public/avatar-2.jpg
new file mode 100644
index 0000000..f6c1424
Binary files /dev/null and b/public/avatar-2.jpg differ
diff --git a/public/avatar-3.jpg b/public/avatar-3.jpg
new file mode 100644
index 0000000..54985d4
Binary files /dev/null and b/public/avatar-3.jpg differ
diff --git a/public/avatar-4.jpg b/public/avatar-4.jpg
new file mode 100644
index 0000000..9114498
Binary files /dev/null and b/public/avatar-4.jpg differ
diff --git a/public/avatar-5.jpg b/public/avatar-5.jpg
new file mode 100644
index 0000000..624f0b6
Binary files /dev/null and b/public/avatar-5.jpg differ
diff --git a/public/avatar-6.jpg b/public/avatar-6.jpg
new file mode 100644
index 0000000..de939ee
Binary files /dev/null and b/public/avatar-6.jpg differ