local-alert.tsx 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. import React from "react";
  2. import Link from "next/link";
  3. import { useI18n } from "locales/client";
  4. import { cn } from "@/shared/lib/utils";
  5. import { paths } from "@/shared/constants/paths";
  6. import { Alert, AlertDescription } from "@/components/ui/alert";
  7. interface LocalAlertProps {
  8. className?: string;
  9. }
  10. export const LocalAlert = ({ className }: LocalAlertProps) => {
  11. const t = useI18n();
  12. return (
  13. <Alert className={cn("bg-blue-100 border-0 text-black", className)} variant="info">
  14. <AlertDescription className="flex flex-wrap items-center gap-1 italic text-base">
  15. {t("profile.alert.title")}
  16. <br className="sm:hidden" />
  17. <Link className="ml-1 mr-1 font-medium text-blue-700 underline" href={paths.signUp}>
  18. {t("profile.alert.create_account")}
  19. </Link>
  20. {t("commons.or").toLocaleLowerCase()}
  21. <Link className="ml-1 font-medium text-purple-700 underline" href={paths.signIn}>
  22. {t("profile.alert.log_in")}
  23. </Link>
  24. {t("profile.alert.to_ensure_it_is_not_getting_lost")}
  25. </AlertDescription>
  26. </Alert>
  27. );
  28. };