Skip to content

Commit cac7a09

Browse files
author
Manuel Schächinger
committed
2 parents 2c6dc1d + 10df82d commit cac7a09

12 files changed

Lines changed: 161 additions & 184 deletions

File tree

app/[locale]/about/page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,22 +57,22 @@ const AboutPage = async () => {
5757
<p className="mb-2">{t('profile.bullets.work', { years })}</p>
5858
<p className="mb-2">{t.rich('profile.bullets.stack', {
5959
link: (label: React.ReactNode) => (
60-
<Link href="/work#stack" className="inline-link">{label}</Link>
60+
<Link href="/work#stack" inline>{label}</Link>
6161
),
6262
})}</p>
6363
<p className="mb-2">{t.rich('profile.bullets.education', {
6464
link: (label: React.ReactNode) => (
65-
<Link href="/resume#hm" className="inline-link">{label}</Link>
65+
<Link href="/resume#hm" inline>{label}</Link>
6666
),
6767
})}</p>
6868
<p className="mb-2">{t.rich('profile.bullets.sports', {
6969
link: (label: React.ReactNode) => (
70-
<Link href="/sports#marathons" className="inline-link">{label}</Link>
70+
<Link href="/sports#marathons" inline>{label}</Link>
7171
),
7272
})}</p>
7373
<p>{t.rich('profile.bullets.medalmonday', {
7474
link: (label: React.ReactNode) => (
75-
<Link href="/projects/medalmonday" className="inline-link">{label}</Link>
75+
<Link href="/projects/medalmonday" inline>{label}</Link>
7676
),
7777
})}</p>
7878
</BulletList>

app/components/atoms/Link.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@ type Props = {
1111
className?: string;
1212
inline?: boolean;
1313
locale?: LocaleCode;
14+
prefetch?: boolean;
1415
target?: string;
1516
title?: string;
1617
onClick?: React.MouseEventHandler;
1718
};
1819

19-
const Link = ({ accessKey, children, className, href, inline, locale, onClick, target, title }: Props) => {
20+
const Link = ({ accessKey, children, className, href, inline, locale, onClick, prefetch, target, title }: Props) => {
2021
// const currentLocale = useLocale() as LocaleCode;
2122
const intlLocale = useLocale();
2223
const linkLocale = locale || intlLocale;
@@ -34,6 +35,7 @@ const Link = ({ accessKey, children, className, href, inline, locale, onClick, t
3435
title={title}
3536
onClick={onClick}
3637
accessKey={accessKey}
38+
prefetch={prefetch}
3739
>{children}</NextLink>
3840
);
3941
};

app/components/atoms/SnesButtons.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const SnesButtons = () => {
1010
<span className={clsx('left-0 top-6 hover:bg-snes-y hover:text-contrast-50', className)}>Y</span>
1111
<span className={clsx('left-6 top-0 hover:bg-snes-x hover:text-contrast-50', className)}>X</span>
1212
<span className={clsx('left-12 top-6 hover:bg-snes-a hover:text-contrast-50', className)}>A</span>
13-
<Link href="/" className={clsx('left-6 top-12 hover:bg-snes-b hover:text-contrast-950 hover:dark:text-contrast-950', className)}>B</Link>
13+
<Link href="/" className={clsx('left-6 top-12 hover:bg-snes-b hover:text-contrast-950 hover:dark:text-contrast-950', className)} prefetch={false}>B</Link>
1414
</div>
1515
);
1616
};

app/components/atoms/YearInFigures.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ const calcDays = (factor = 1) => {
1616
};
1717

1818
const YearInFigures = async () => {
19-
const [data, t] = await Promise.all([loadFigures(), getTranslations('yearInFigures')]);
19+
const [data, t] = await Promise.all([
20+
loadFigures(new Date().getFullYear()),
21+
getTranslations('yearInFigures'),
22+
]);
2023

2124
const figures = [
2225
{

app/components/molecules/LanguageSelection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const LanguageSelection = () => {
1515
<ul className="flex flex-col gap-2 sm:gap-0 justify-center">
1616
{supportedLangs.map((lang) => (
1717
<li key={lang} className="py-1.5">
18-
<Link href={page} locale={lang} className="font-normal">{translations.name[lang]}</Link>
18+
<Link href={page} locale={lang} prefetch={false} className="font-normal">{translations.name[lang]}</Link>
1919
</li>
2020
))}
2121
</ul>

app/components/molecules/ProjectLinks.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,35 +21,35 @@ const ProjectLinks = ({ links }: Props) => {
2121
link: () => <Link
2222
href={links.project!.link}
2323
target="_blank"
24-
className="inline-link"
24+
inline
2525
>{ links.project!.label }</Link>
2626
})}</p>}
2727
{links?.code && <p className="link--code mb-2">{t.rich('code', {
2828
link: () => <Link
2929
href={links.code!.link}
3030
target="_blank"
31-
className="inline-link"
31+
inline
3232
>{ links.code!.label }</Link>
3333
})}</p>}
3434
{links?.github && <p className="link--github mb-2">{t.rich('code', {
3535
link: () => <Link
3636
href={`https://github.com/${links.github!.join('/')}`}
3737
target="_blank"
38-
className="inline-link"
38+
inline
3939
>GitHub</Link>
4040
})}</p>}
4141
{links?.package && <p className="link--package mb-2">{t.rich('package', {
4242
link: () => <Link
4343
href={links.package!.link}
4444
target="_blank"
45-
className="inline-link"
45+
inline
4646
>{ links.package!.label }</Link>
4747
})}</p>}
4848
{links?.npm && <p className="link--npm mb-2">{t.rich('package', {
4949
link: () => <Link
5050
href={`https://npmjs.org/package/${links.npm}`}
5151
target="_blank"
52-
className="inline-link"
52+
inline
5353
>npm</Link>
5454
})}</p>}
5555
</PageSection>

app/components/organisms/Footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const Footer = () => {
3131
<ul className="flex flex-col gap-2 sm:gap-0 justify-center">
3232
{LEGAL_NAVIGATION.map((page) => (
3333
<li key={page} className="py-1.5">
34-
<Link href={`/${page}`} className="font-normal">{t(page as 'imprint')}</Link>
34+
<Link href={`/${page}`} className="font-normal" prefetch={false}>{t(page as 'imprint')}</Link>
3535
</li>
3636
))}
3737
</ul>

0 commit comments

Comments
 (0)