diff --git a/client/components/header/controls.tsx b/client/components/header/controls.tsx
new file mode 100644
index 00000000..c268b99a
--- /dev/null
+++ b/client/components/header/controls.tsx
@@ -0,0 +1,44 @@
+import React, { useMemo } from 'react'
+import Router, { useRouter } from 'next/router'
+import MoonIcon from '@geist-ui/icons/moon'
+import SunIcon from '@geist-ui/icons/sun'
+import UserIcon from '@geist-ui/icons/user'
+import GitHubIcon from '@geist-ui/icons/github'
+import { Select, Spacer, useTheme } from '@geist-ui/core'
+import { ThemeProps } from '../../pages/_app'
+// import { useAllThemes, useTheme } from '@geist-ui/core'
+import styles from './header.module.css'
+
+const Controls = ({ changeTheme, theme }: ThemeProps) => {
+ const switchThemes = (type: string | string[]) => {
+ changeTheme()
+ if (typeof window === 'undefined' || !window.localStorage) return
+ window.localStorage.setItem('drift-theme', Array.isArray(type) ? type[0] : type)
+ }
+
+
+ return (
+
+
+
+ )
+}
+
+export default React.memo(Controls);
diff --git a/client/components/header/header.module.css b/client/components/header/header.module.css
index 0a6cd1e8..7b1d1e25 100644
--- a/client/components/header/header.module.css
+++ b/client/components/header/header.module.css
@@ -11,7 +11,7 @@
display: none;
}
-@media only screen and (max-width: 600px) {
+@media only screen and (max-width: 650px) {
.tabs {
display: none;
}
@@ -31,3 +31,22 @@
height: 40px;
padding: 0;
}
+
+.wrapper {
+ display: flex;
+ align-items: center;
+ width: min-content;
+}
+
+.selectContent {
+ width: auto;
+ height: 18px;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.selectContent :global(svg) {
+ margin-right: 10px;
+ margin-left: 2px;
+}
diff --git a/client/components/header/index.tsx b/client/components/header/index.tsx
index c901a14c..55fb6a3e 100644
--- a/client/components/header/index.tsx
+++ b/client/components/header/index.tsx
@@ -5,9 +5,11 @@ import { useEffect, useMemo, useState } from "react";
import styles from './header.module.css';
import { useRouter } from "next/router";
import useSignedIn from "../../lib/hooks/use-signed-in";
+import Mobile from "./controls";
+import Controls from "./controls";
-const Header = ({ changeTheme }: DriftProps) => {
+const Header = ({ changeTheme, theme }: DriftProps) => {
const router = useRouter();
const [selectedTab, setSelectedTab] = useState();
const [expanded, setExpanded] = useState(false)
@@ -43,12 +45,12 @@ const Header = ({ changeTheme }: DriftProps) => {
icon: ,
condition: isSignedIn
},
- {
- name: "Settings",
- href: "/",
- icon: ,
- condition: isSignedIn
- },
+ // {
+ // name: "Settings",
+ // href: "/settings",
+ // icon: ,
+ // condition: isSignedIn
+ // },
{
name: "Sign out",
action: () => {
@@ -107,7 +109,6 @@ const Header = ({ changeTheme }: DriftProps) => {
}
}}>
{pages.map((tab, index) => {
- console.log(tab, tab.condition)
if (tab.condition)
return {
- {isMobile ? (
+ {isMobile && (
- ) : (
- //
- <>>
)}