Skip to content

Commit

Permalink
🐛 fix: Fix helmet
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Nov 24, 2024
1 parent b6132a0 commit c5ffb41
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/components/Analytics/Clarity.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { memo } from 'react';
import { FC } from 'react';

const MicrosoftClarity = memo<{ projectId: string }>(({ projectId }) => {
const MicrosoftClarity: FC<{ projectId: string }> = ({ projectId }) => {
return (
<script
dangerouslySetInnerHTML={{
Expand All @@ -15,6 +15,6 @@ const MicrosoftClarity = memo<{ projectId: string }>(({ projectId }) => {
id="microsoft-clarity-init"
/>
);
});
};

export default MicrosoftClarity;
6 changes: 3 additions & 3 deletions src/components/Analytics/GoogleAnalytics.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { memo } from 'react';
import { FC } from 'react';

const GoogleAnalytics = memo<{ measurementId: string }>(({ measurementId }) => {
const GoogleAnalytics: FC<{ measurementId: string }> = ({ measurementId }) => {
return (
<>
<script async src={`https://www.googletagmanager.com/gtag/js?id=${measurementId}`} />
Expand All @@ -19,6 +19,6 @@ const GoogleAnalytics = memo<{ measurementId: string }>(({ measurementId }) => {
/>
</>
);
});
};

export default GoogleAnalytics;
11 changes: 6 additions & 5 deletions src/components/Analytics/Plausible.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { memo } from 'react';
import { FC } from 'react';

const PlausibleAnalytics = memo<{ domain: string; scriptBaseUrl: string }>(
({ domain, scriptBaseUrl }) => (
<script data-domain={domain} defer src={`${scriptBaseUrl}/js/script.js`} />
),
const PlausibleAnalytics: FC<{
domain: string;
scriptBaseUrl: string;
}> = ({ domain, scriptBaseUrl }) => (
<script data-domain={domain} defer src={`${scriptBaseUrl}/js/script.js`} />
);

export default PlausibleAnalytics;
3 changes: 2 additions & 1 deletion src/components/Analytics/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { Helmet } from 'dumi';
import { FC } from 'react';

import { siteSelectors, useSiteStore } from '@/store';

import ClarityAnalytics from './Clarity';
import GoogleAnalytics from './GoogleAnalytics';
import Plausible from './Plausible';

const Analytics = () => {
const Analytics: FC = () => {
const analytics = useSiteStore(siteSelectors.analytics);
return (
<Helmet>
Expand Down

0 comments on commit c5ffb41

Please sign in to comment.