Fix links.

This commit is contained in:
Mike Cao 2023-01-10 00:13:32 -08:00
parent 7450b76e6d
commit 70ef857dc7
4 changed files with 10 additions and 5 deletions

View File

@ -8,6 +8,7 @@
.title {
flex: 1;
font-size: var(--font-size-lg);
font-weight: 700;
display: flex;
align-items: center;
flex-direction: row;

View File

@ -2,7 +2,11 @@ import { TextArea } from 'react-basics';
import { TRACKER_SCRIPT_URL } from 'lib/constants';
export default function TrackingCode({ websiteId }) {
const code = `<script async src="${TRACKER_SCRIPT_URL}" data-website-id="${websiteId}"></script>`;
const url = TRACKER_SCRIPT_URL.startsWith('http')
? TRACKER_SCRIPT_URL
: `${location.origin}${TRACKER_SCRIPT_URL}`;
const code = `<script async src="${url}" data-website-id="${websiteId}"></script>`;
return (
<>

View File

@ -46,8 +46,8 @@ export default function WebsiteDetails({ websiteId }) {
</Item>
<Item>{values?.name}</Item>
</Breadcrumbs>
<Link href={`/analytics/websites/${websiteId}`}>
<a target="_blank">
<Link href={`/websites/${websiteId}`}>
<a>
<Button variant="primary">
<Icon>
<ExternalLink />

View File

@ -38,8 +38,8 @@ export default function WebsitesTable({ columns = [], rows = [] }) {
</Button>
</a>
</Link>
<Link href={`/analytics/websites/${id}`}>
<a target="_blank">
<Link href={`/websites/${id}`}>
<a>
<Button>
<Icon>
<ExternalLink />