diff --git a/components/common/DropDown.js b/components/common/DropDown.js
index b6b2357b..d240fbd6 100644
--- a/components/common/DropDown.js
+++ b/components/common/DropDown.js
@@ -37,7 +37,7 @@ export default function DropDown({
return (
- {options.find(e => e.value === value)?.label || value}
+
{options.find(e => e.value === value)?.label || value}
} className={styles.icon} size="small" />
{showMenu && (
diff --git a/components/common/Dropdown.module.css b/components/common/Dropdown.module.css
index 4b94f58f..9738b007 100644
--- a/components/common/Dropdown.module.css
+++ b/components/common/Dropdown.module.css
@@ -19,6 +19,10 @@
min-width: 160px;
}
+.text {
+ flex: 1;
+}
+
.icon {
padding-left: 20px;
}
diff --git a/components/layout/Page.js b/components/layout/Page.js
index c9a928c5..28492ddf 100644
--- a/components/layout/Page.js
+++ b/components/layout/Page.js
@@ -1,6 +1,7 @@
import React from 'react';
+import classNames from 'classnames';
import styles from './Page.module.css';
-export default function Page({ children }) {
- return
{children}
;
+export default function Page({ className, children }) {
+ return
{children}
;
}
diff --git a/components/layout/PageHeader.module.css b/components/layout/PageHeader.module.css
index 74f7d1a2..263bd5b7 100644
--- a/components/layout/PageHeader.module.css
+++ b/components/layout/PageHeader.module.css
@@ -4,4 +4,5 @@
align-items: center;
align-content: center;
min-height: 80px;
+ align-self: stretch;
}
diff --git a/components/metrics/WebsiteChart.js b/components/metrics/WebsiteChart.js
index 99c03951..ea86ad3e 100644
--- a/components/metrics/WebsiteChart.js
+++ b/components/metrics/WebsiteChart.js
@@ -59,7 +59,7 @@ export default function WebsiteChart({
}
return (
- <>
+
- >
+
);
}
diff --git a/components/metrics/WebsiteChart.module.css b/components/metrics/WebsiteChart.module.css
index 29f94670..0e947aea 100644
--- a/components/metrics/WebsiteChart.module.css
+++ b/components/metrics/WebsiteChart.module.css
@@ -1,6 +1,7 @@
.container {
display: flex;
flex-direction: column;
+ align-self: stretch;
}
.title {
diff --git a/components/settings/Settings.js b/components/pages/Settings.js
similarity index 87%
rename from components/settings/Settings.js
rename to components/pages/Settings.js
index be9feb35..c6e39f2a 100644
--- a/components/settings/Settings.js
+++ b/components/pages/Settings.js
@@ -2,9 +2,9 @@ import React, { useState } from 'react';
import { useRouter } from 'next/router';
import Page from 'components/layout/Page';
import MenuLayout from 'components/layout/MenuLayout';
-import WebsiteSettings from './WebsiteSettings';
-import AccountSettings from './AccountSettings';
-import ProfileSettings from './ProfileSettings';
+import WebsiteSettings from '../settings/WebsiteSettings';
+import AccountSettings from '../settings/AccountSettings';
+import ProfileSettings from '../settings/ProfileSettings';
import { useSelector } from 'react-redux';
import { FormattedMessage } from 'react-intl';
diff --git a/components/pages/Test.js b/components/pages/Test.js
new file mode 100644
index 00000000..84efbd67
--- /dev/null
+++ b/components/pages/Test.js
@@ -0,0 +1,92 @@
+import React, { useState } from 'react';
+import classNames from 'classnames';
+import Head from 'next/head';
+import Link from 'next/link';
+import Page from '../layout/Page';
+import PageHeader from '../layout/PageHeader';
+import useFetch from '../../hooks/useFetch';
+import DropDown from '../common/DropDown';
+import styles from './Test.module.css';
+import WebsiteChart from '../metrics/WebsiteChart';
+import EventsChart from '../metrics/EventsChart';
+import Button from '../common/Button';
+import EmptyPlaceholder from '../common/EmptyPlaceholder';
+
+export default function Test() {
+ const [website, setWebsite] = useState();
+ const { data } = useFetch('/api/websites');
+
+ if (!data) {
+ return null;
+ }
+
+ const options = data.map(({ name, website_id }) => ({ label: name, value: website_id }));
+ const selectedValue = options.find(({ value }) => value === website?.website_id)?.value;
+
+ function handleSelect(value) {
+ setWebsite(data.find(({ website_id }) => website_id === value));
+ }
+
+ function handleClick() {
+ window.umami('event (default)');
+ window.umami.trackView('/page-view', 'https://www.google.com');
+ window.umami.trackEvent('event (custom)', 'custom-type');
+ }
+
+ return (
+