File size: 1,567 Bytes
de852c2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import React from 'react';
import { useAppConfig } from '../contexts/AppConfigContext';

const CopyrightNotice = ({ variant = 'footer', className = '' }) => {
  const { config } = useAppConfig();
  const isSidebar = variant === 'sidebar';
  const textClass = isSidebar ? 'sidebar-copyright-text' : 'footer-text';
  const patentsClass = isSidebar ? 'sidebar-patents-link' : 'footer-patents-link';
  const combinedClass = className ? `${textClass} ${className}` : textClass;

  // Prefer the author/copyright line from config (app.footer_text). This keeps
  // the footer themed per-panel instead of hardcoding a single brand.
  const footerText = config?.app?.footer_text?.trim();

  // When a panel provides its own footer_text (author/copyright line), show only
  // that and skip the Neon.ai brand + patents link.
  if (footerText) {
    return <p className={combinedClass}>{footerText}</p>;
  }

  return (
    <p className={combinedClass}>
      {'\u00A9 '}
      {isSidebar ? (
        'Neon.ai'
      ) : (
        <a
          href="https://neon.ai"
          target="_blank"
          rel="noopener noreferrer"
          className="footer-neon-link"
        >
          <img src="/neon-logo.png" alt="" className="footer-neon-logo" />
          Neon.ai
        </a>
      )}
      . All rights reserved.
      {' '}
      <a
        href="https://www.neon.ai/contact"
        target="_blank"
        rel="noopener noreferrer"
        className={patentsClass}
      >
        Patents and licensing.
      </a>
    </p>
  );
};

export default CopyrightNotice;