From 8e4b371ff7951b626d023cbf25c54bd7830ab577 Mon Sep 17 00:00:00 2001 From: Valentino Kozinec Date: Wed, 9 Feb 2022 10:13:53 +0100 Subject: [PATCH] Domain fix --- src/modules/dashboard/Dashboard.tsx | 4 +++- .../dashboard/components/DashboardCard/DashboardCard.tsx | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/modules/dashboard/Dashboard.tsx b/src/modules/dashboard/Dashboard.tsx index bf8dd02..deea794 100644 --- a/src/modules/dashboard/Dashboard.tsx +++ b/src/modules/dashboard/Dashboard.tsx @@ -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 (
diff --git a/src/modules/dashboard/components/DashboardCard/DashboardCard.tsx b/src/modules/dashboard/components/DashboardCard/DashboardCard.tsx index 4ca9d3b..fccb3c0 100644 --- a/src/modules/dashboard/components/DashboardCard/DashboardCard.tsx +++ b/src/modules/dashboard/components/DashboardCard/DashboardCard.tsx @@ -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 = ({ app, rootDomain }: { app: any; rootDomain: string }) => { const [readMoreVisible, setReadMoreVisible] = useState(false); @@ -35,13 +34,14 @@ export const DashboardCard: React.FC = ({ app, rootDomain }: { app: any; ro
- Launch App - +