Domain fix

This commit is contained in:
Valentino Kozinec 2022-02-09 10:13:53 +01:00
parent 8bf2460f65
commit 8e4b371ff7
2 changed files with 7 additions and 5 deletions

View file

@ -5,7 +5,9 @@ import { DashboardCard } from './components';
export const Dashboard: React.FC = () => {
const host = window.location.hostname;
const rootDomain = host.split('.').shift();
const splitedDomain = host.split('.');
splitedDomain.shift();
const rootDomain = splitedDomain.join('.');
return (
<div className="relative">

View file

@ -1,7 +1,6 @@
import React, { useState, useEffect } from 'react';
import { Modal } from 'src/components';
import ReactMarkdown from 'react-markdown';
import { Link } from 'react-router-dom';
export const DashboardCard: React.FC<any> = ({ app, rootDomain }: { app: any; rootDomain: string }) => {
const [readMoreVisible, setReadMoreVisible] = useState(false);
@ -35,13 +34,14 @@ export const DashboardCard: React.FC<any> = ({ app, rootDomain }: { app: any; ro
</div>
</div>
<div className="px-2.5 py-2.5 sm:px-4 flex justify-end">
<Link
to={`${app.urlShorthand}.${rootDomain}`}
<a
href={`${app.urlShorthand}.${rootDomain}`}
target="_blank"
rel="noreferrer"
className="inline-flex items-center px-2.5 py-1.5 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-primary-600 hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500"
>
Launch App
</Link>
</a>
</div>
</div>