Add noreferrer automatically to link tags. Closes #1941
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { Layout } from 'antd';
|
||||
import { useRecoilValue } from 'recoil';
|
||||
import Head from 'next/head';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import {
|
||||
ClientConfigStore,
|
||||
isChatAvailableSelector,
|
||||
@@ -11,6 +12,7 @@ import { Content, Header } from '../ui';
|
||||
import { ClientConfig } from '../../interfaces/client-config.model';
|
||||
import { DisplayableError } from '../../types/displayable-error';
|
||||
import FatalErrorStateModal from '../modals/FatalErrorModal';
|
||||
import setupNoLinkReferrer from '../../utils/no-link-referrer';
|
||||
|
||||
function Main() {
|
||||
const clientConfig = useRecoilValue<ClientConfig>(clientConfigStateAtom);
|
||||
@@ -18,6 +20,12 @@ function Main() {
|
||||
const isChatAvailable = useRecoilValue<boolean>(isChatAvailableSelector);
|
||||
const fatalError = useRecoilValue<DisplayableError>(fatalErrorStateAtom);
|
||||
|
||||
const layoutRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
useEffect(() => {
|
||||
setupNoLinkReferrer(layoutRef.current);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
@@ -80,7 +88,7 @@ function Main() {
|
||||
</Head>
|
||||
|
||||
<ClientConfigStore />
|
||||
<Layout>
|
||||
<Layout ref={layoutRef}>
|
||||
<Header name={title || name} chatAvailable={isChatAvailable} />
|
||||
<Content />
|
||||
{fatalError && (
|
||||
|
||||
Reference in New Issue
Block a user