Skip to content

Commit

Permalink
refactor(src): ⚡ Switch to next/link instead of Anchors
Browse files Browse the repository at this point in the history
  • Loading branch information
Nudelsuppe42 committed Dec 16, 2023
1 parent 651cfff commit b2ee9cf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/components/map/ClaimDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { useClipboard } from '@mantine/hooks';
import { showNotification } from '@mantine/notifications';
import { getAreaOfPolygon } from 'geolib';
import mapboxgl from 'mapbox-gl';
import Link from 'next/link';
import useSWR from 'swr';
import { useUser } from '../../hooks/useUser';
import { StatsGrid } from '../Stats';
Expand Down Expand Up @@ -86,7 +87,7 @@ export function ClaimDrawer(props: ClaimDrawerProps) {
<Avatar
src={data.buildTeam.icon}
size={60}
component="a"
component={Link}
href={`/teams/${data.buildTeam.id}`}
/>
<Text size="xl" fw={700}>
Expand Down Expand Up @@ -172,7 +173,7 @@ export function ClaimDrawer(props: ClaimDrawerProps) {
</Button>
{data.owner?.id == user?.id && (
<Button
component="a"
component={Link}
variant="outline"
leftSection={<IconPencil />}
href={`/me/claims/${props.id}`}
Expand Down
3 changes: 2 additions & 1 deletion src/pages/contact.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
import { IconMail } from '@tabler/icons-react';
import { NextPage } from 'next';
import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
import Link from 'next/link';
import { useRouter } from 'next/router';
import { At } from 'tabler-icons-react';
import Page from '../components/Page';
Expand Down Expand Up @@ -173,7 +174,7 @@ const Contact: NextPage = ({ data }: any) => {
of your ban message and your reason for appealing. Illegitimate appeals will be ignored.
</p>
<Button
component="a"
component={Link}
variant="outline"
leftSection={<IconMail />}
href="mailto:[email protected]"
Expand Down
3 changes: 2 additions & 1 deletion src/pages/me/claims/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { showNotification } from '@mantine/notifications';
import MapboxDraw from '@mapbox/mapbox-gl-draw';
import { NextPage } from 'next';
import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
import Link from 'next/link';
import { useRouter } from 'next/router';
import { useState } from 'react';
import { useTranslation } from 'react-i18next';
Expand Down Expand Up @@ -125,7 +126,7 @@ const ClaimPage: NextPage = ({ claimId, data }: any) => {
<Group>
<Button
variant="outline"
component="a"
component={Link}
href={
router.query.z && router.query.lat && router.query.lng
? `/map?z=${router.query.z}&lat=${router.query.lat}&lng=${router.query.lng}`
Expand Down

0 comments on commit b2ee9cf

Please sign in to comment.