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 { .title {
flex: 1; flex: 1;
font-size: var(--font-size-lg); font-size: var(--font-size-lg);
font-weight: 700;
display: flex; display: flex;
align-items: center; align-items: center;
flex-direction: row; flex-direction: row;

View File

@ -2,7 +2,11 @@ import { TextArea } from 'react-basics';
import { TRACKER_SCRIPT_URL } from 'lib/constants'; import { TRACKER_SCRIPT_URL } from 'lib/constants';
export default function TrackingCode({ websiteId }) { 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 ( return (
<> <>

View File

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

View File

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