Compare commits

...

3 commits

Author SHA1 Message Date
Luca Burgio f9d372b606 chore: prettier 2024-02-20 11:22:56 +01:00
Luca Burgio d0a566a495 fix: removed bottom license url from README 2024-02-20 11:13:04 +01:00
Luca Burgio b0f4479a65 fix: logic for canonical 2024-02-20 11:07:31 +01:00
3 changed files with 11 additions and 5 deletions

View file

@ -121,4 +121,4 @@ struct ContentView: View {
## License
[MIT](./LICENSE)
MIT License.

View file

@ -26,7 +26,6 @@ export function Header({ currentVersion }: HeaderProps) {
'https://lucaburgio.com/join?utm_source=iconoir&utm_medium=join-head-banner'
}
target={'_blank'}
rel={'noreferrer'}
>
Access to the latest updates on new icons and ideas. Join the
newsletter.
@ -53,7 +52,7 @@ export function Header({ currentVersion }: HeaderProps) {
Donate — Our Mission
</NavigationItem>
<Share $isMobile>
<a href={SHARE_LINK} target={'_blank'} rel={'noreferrer'}>
<a href={SHARE_LINK} target={'_blank'} rel={'noreferrer nofollow'}>
Share with <Heart width={'1em'} height={'1em'} /> on{' '}
<span>X (Twitter)</span>
</a>
@ -62,7 +61,7 @@ export function Header({ currentVersion }: HeaderProps) {
</HeaderCenter>
<HeaderRight>
<Share>
<a href={SHARE_LINK} target={'_blank'} rel={'noreferrer'}>
<a href={SHARE_LINK} target={'_blank'} rel={'noreferrer nofollow'}>
Share with <Heart width={'1em'} height={'1em'} /> on{' '}
<span>X (Twitter)</span>
</a>

View file

@ -1,4 +1,5 @@
import Head from 'next/head';
import { useRouter } from 'next/router';
const TITLE_SUFFIX = 'Iconoir | Free Icons';
@ -7,13 +8,19 @@ export interface SEOProps {
description?: string;
}
export function SEO({ title, description }: SEOProps) {
const { asPath } = useRouter();
const pageTitle = title ? `${title} | ${TITLE_SUFFIX}` : TITLE_SUFFIX;
const pageDescription = description;
const pathWithoutQuery = asPath.split(/[?#]/)[0];
const canonicalUrl = `https://iconoir.com${
pathWithoutQuery !== '/' ? pathWithoutQuery : ''
}`;
return (
<Head>
<title>{pageTitle}</title>
<link rel="canonical" href="https://iconoir.com/" />
<link rel="canonical" href={canonicalUrl} />
<meta name="description" content={pageDescription} />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />