File size: 908 Bytes
9cd6ddb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { login, useUser } from "@/utils/auth";

import { Premium } from ".";
import { FormattedMessage } from "react-intl";

export const PremiumOverlay = ({ className }: any) => {
  const { user } = useUser();
  return !user ? (
    <div
      className={`absolute left-0 top-0 w-full h-full bg-opacity-80 bg-dark-600 flex items-center justify-center flex-col gap-3 ${className}`}
    >
      <Premium size="32" tooltip={false} />
      <div>
        <p className="font-semibold text-white text-lg">
          <FormattedMessage id="freemium.overlay.title" />
        </p>
        <button
          className="bg-yellow text-white rounded-lg w-full text-center px-3 py-3 mt-2 text-sm font-semibold hover:bg-opacity-80 flex items-center justify-center gap-2"
          onClick={login}
        >
          <FormattedMessage id="freemium.overlay.cta" />
        </button>
      </div>
    </div>
  ) : null;
};