File size: 2,286 Bytes
dbcdc7c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import { useOptions } from '../utils/optionsContext';
import { Bookmark, HeartPlus } from 'lucide-react';
import { memo, useCallback, useState } from 'react';
import Disc from './Discord';
import clsx from 'clsx';
import BookmarksModal from './Bookmarks';

const Footer = memo(() => {
  const { options } = useOptions();
  const [isBookmarksOpen, setIsBookmarksOpen] = useState(false);

  const handleDs = useCallback(() => {
    window.open('/ds', '_blank');
  }, []);

  const handleAboutBlank = useCallback(() => {
    import('/src/utils/utils.js').then(({ openAboutBlankPopup }) => openAboutBlankPopup(true));
  }, []);

  return (
    <div className="w-full fixed bottom-0 flex items-end justify-between p-2">
      {options.donationBtn !== false && (
        <a
          href="https://ko-fi.com/I3I81MF4CH"
          target="_blank"
          rel="noopener noreferrer"
          className={clsx(
            'flex gap-1 items-center cursor-pointer',
            'hover:-translate-y-0.5 duration-200',
          )}
        >
          <HeartPlus className="w-4" />
          Support us
        </a>
      )}
      <div className="flex gap-2 items-center">
        <div
          className={clsx(
            'flex gap-1 items-center cursor-pointer',
            'hover:-translate-y-0.5 duration-200',
          )}
          onClick={handleAboutBlank}
        >
          about:blank
        </div>
        <span className="text-gray-500">•</span>
        <div
          className={clsx(
            'flex gap-1 items-center cursor-pointer',
            'hover:-translate-y-0.5 duration-200',
          )}
          onClick={handleDs}
        >
          <Disc className="w-4" fill={options.siteTextColor || '#a0b0c8'} />
          Discord
        </div>
        <span className="text-gray-500">•</span>
        <div
          className={clsx(
            'flex gap-1 items-center cursor-pointer',
            'hover:-translate-y-0.5 duration-200',
          )}
          onClick={() => setIsBookmarksOpen(true)}
        >
          <Bookmark className="w-4" />
          Bookmarks
        </div>
      </div>
      <BookmarksModal isOpen={isBookmarksOpen} onClose={() => setIsBookmarksOpen(false)} />
    </div>
  );
});

Footer.displayName = 'Footer';
export default Footer;