Browse Source

feat(auth): update privacy policy link and terminology for clarity and consistency across the application
refactor(paths): centralize path constants for privacy and terms to improve maintainability
fix(email): update contact email addresses to reflect the new domain for better branding
style(input): enhance input component styles for better dark mode support
chore(footer): remove deprecated FloatingLegalFooter component to streamline codebase
style(verify-email): adjust layout styles for improved user experience on verify email page

Mathias 1 month ago
parent
commit
3e49e3ecf3

+ 2 - 5
app/[locale]/auth/(auth-layout)/signup/page.tsx

@@ -1,6 +1,7 @@
 import Link from "next/link";
 
 import { getI18n } from "locales/server";
+import { paths } from "@/shared/constants/paths";
 import { SignUpForm } from "@/features/auth/signup/ui/signup-form";
 
 export const metadata = {
@@ -23,13 +24,9 @@ export default async function AuthSignUpPage() {
       <div className="text-muted-foreground mt-6 text-center text-sm">
         <p>
           {t("register_terms")}{" "}
-          <Link className="font-medium text-primary underline-offset-4 hover:underline" href="/terms">
+          <Link className="font-medium text-primary underline-offset-4 hover:underline" href={paths.privacy}>
             {t("register_privacy")}
           </Link>{" "}
-          {t("register_privacy_link")}{" "}
-          <Link className="font-medium text-primary underline-offset-4 hover:underline" href="/privacy">
-            {t("register_privacy_link_2")}
-          </Link>
           .
         </p>
       </div>

+ 1 - 1
app/[locale]/auth/verify-email/layout.tsx

@@ -17,5 +17,5 @@ export default async function RootLayout({ children }: RootLayoutProps) {
     redirect(`${getServerUrl()}/${paths.root}`);
   }
 
-  return <div>{children}</div>;
+  return children;
 }

+ 1 - 1
locales/en.ts

@@ -10,7 +10,7 @@ export default {
   register_title: "Create an account",
   register_description: "Enter your information below to create your account",
   register_terms: "By signing up, you agree to our",
-  register_privacy: "Terms of Service",
+  register_privacy: "Privacy Policy",
   register_privacy_link: "and our",
   register_privacy_link_2: "Privacy Policy",
   password_forgot_title: "Forgot password?",

+ 1 - 1
locales/fr.ts

@@ -10,7 +10,7 @@ export default {
   register_title: "Créer un compte",
   register_description: "Entrez vos informations ci-dessous pour créer votre compte",
   register_terms: "En vous inscrivant, vous acceptez nos",
-  register_privacy: "Conditions d'utilisation",
+  register_privacy: "Politique de confidentialité",
   register_privacy_link: "et notre",
   register_privacy_link_2: "Politique de confidentialité",
   password_forgot_title: "Forgot password?",

+ 2 - 2
src/components/ui/input.tsx

@@ -7,12 +7,12 @@ import { Slot } from "@radix-ui/react-slot";
 import { cn } from "@/shared/lib/utils";
 
 const inputVariants = cva(
-  "shadow-3xl relative w-full rounded-lg px-3.5 py-2.5 text-sm/[10px] font-medium text-black outline-none placeholder:font-normal placeholder:text-gray-500 focus:ring-1 focus:ring-black disabled:pointer-events-none disabled:opacity-30 ltr:text-left rtl:text-right",
+  "shadow-3xl relative w-full rounded-lg px-3.5 py-2.5 text-sm/[10px] font-medium text-black dark:text-white outline-none placeholder:font-normal placeholder:text-gray-500 focus:ring-1 focus:ring-black disabled:pointer-events-none disabled:opacity-30 ltr:text-left rtl:text-right",
   {
     variants: {
       variant: {
         default: "",
-        Search: "border border-gray-300 py-[7px] pl-8 pr-2 text-xs shadow-sm placeholder:text-black",
+        Search: "border border-gray-300 py-[7px] pl-8 pr-2 text-xs shadow-sm placeholder:text-black dark:placeholder:text-white",
         "input-form":
           "pr-9 outline-offset-0 focus:outline-[4px] focus:outline-primary/20 focus:ring-1 focus:ring-primary dark:focus:ring-primary",
       },

+ 2 - 2
src/features/auth/verify-email/ui/verify-email-page.tsx

@@ -23,8 +23,8 @@ export const VerifyEmailPage = () => {
   };
 
   return (
-    <div className="bg-background grid min-h-svh place-items-center px-4">
-      <Card className="w-full max-w-md p-4">
+    <div className="bg-background place-items-center px-4 h-full flex items-center justify-center">
+      <Card className="w-full max-w-md p-4 border-none shadow-none">
         <CardHeader className="text-center">
           <div className="mb-4 flex justify-center">
             <div className="rounded-full bg-primary/10 p-3">

+ 2 - 1
src/features/layout/Footer.tsx

@@ -3,6 +3,7 @@ import { Github, Mail, Twitter } from "lucide-react";
 import { getI18n } from "locales/server";
 import { TFunction } from "locales/client";
 import { cn } from "@/shared/lib/utils";
+import { paths } from "@/shared/constants/paths";
 import { Link } from "@/components/ui/link";
 
 const SOCIAL_LINKS = [
@@ -26,7 +27,7 @@ const SOCIAL_LINKS = [
 const NAVIGATION = (t: TFunction) => [
   { name: t("commons.donate"), href: "https://ko-fi.com/workoutcool" },
   { name: t("commons.about"), href: "/about" },
-  { name: t("commons.privacy"), href: "/legal/privacy", hideOnMobile: true },
+  { name: t("commons.privacy"), href: paths.privacy, hideOnMobile: true },
 ];
 
 export const Footer = async () => {

+ 0 - 18
src/features/legal/FloatingLegalFooter.tsx

@@ -1,18 +0,0 @@
-import Link from "next/link";
-import Image from "next/image";
-
-import { SiteConfig } from "@/shared/config/site-config";
-
-export const FloatingLegalFooter = () => {
-  return (
-    <div className="fixed bottom-2 right-2 flex items-center gap-2">
-      <Link className="text-muted-foreground text-xs hover:underline" href="/legal/privacy">
-        Privacy
-      </Link>
-      <Link className="text-muted-foreground text-xs hover:underline" href="/legal/terms">
-        Terms
-      </Link>
-      <Image alt="app icon" height={12} src={SiteConfig.appIcon} width={12} />
-    </div>
-  );
-};

+ 3 - 3
src/shared/config/site-config.ts

@@ -7,14 +7,14 @@ export const SiteConfig = {
   cdnIcon: "https://cdn.workout.cool/images/53992ead-81ad-43d9-bc89-9abe9a6ed800/public", // TODO
   company: {
     name: "Workout Cool",
-    address: "34 avenue des champ Elysée 75008 Paris, France", 
+    address: "34 avenue des champ Elysée 75008 Paris, France",
   },
   brand: {
     primary: "#007291",
   },
   email: {
-    from: "Workout Cool <workoutcool6@gmail.com>",
-    contact: "workoutcool6@gmail.com",
+    from: "Workout Cool <hello@workout.cool>",
+    contact: "hello@workout.cool",
   },
   maker: {
     image: "https://workout.cool/images/me/twitter-en.jpg",

+ 2 - 0
src/shared/constants/paths.ts

@@ -6,4 +6,6 @@ export const paths = {
   resetPassword: "auth/reset-password",
   verifyEmail: "auth/verify-email",
   profile: "profile",
+  privacy: "/legal/privacy",
+  terms: "/legal/terms",
 } as const;