diff --git a/assets/gear-icon-72a7cf.svg b/assets/gear-icon-72a7cf.svg new file mode 100644 index 0000000..e20d7b8 --- /dev/null +++ b/assets/gear-icon-72a7cf.svg @@ -0,0 +1,4 @@ + + + + diff --git a/components/ContentHeader/index.tsx b/components/ContentHeader/index.tsx index 073e2eb..74a3df5 100644 --- a/components/ContentHeader/index.tsx +++ b/components/ContentHeader/index.tsx @@ -4,9 +4,12 @@ import HamburgerIcon from 'assets/icons/hamburger.svg'; import UnionIcon from 'assets/icons/union.svg'; import Dropdown from 'components/Dropdown'; import usePods from 'hooks/usePods'; +import { useRouter } from 'next/router'; const ContentHeader = () => { const { pods } = usePods(); + const router = useRouter(); + const { slug = '/' } = router.query; return (
@@ -15,7 +18,7 @@ const ContentHeader = () => { - Pod 2 / Folder 111 + {slug[0]} {slug[1] && `/ ${slug[1]}`}
diff --git a/components/DirsGrid/index.tsx b/components/DirsGrid/index.tsx new file mode 100644 index 0000000..dc4caae --- /dev/null +++ b/components/DirsGrid/index.tsx @@ -0,0 +1,34 @@ +import { PodDir } from 'contexts/Dirs'; +import Link from 'next/link'; + +interface Props { + pod: string; + dirs: PodDir[]; +} + +const DirsGrid = ({ pod, dirs }: Props) => { + return ( +
+ {dirs && + dirs.map((dir, key: number) => ( +
+ + + + +
+ ))} +
+ ); +}; + +export default DirsGrid; diff --git a/components/Dropdown/index.tsx b/components/Dropdown/index.tsx index 31aa241..9919f76 100644 --- a/components/Dropdown/index.tsx +++ b/components/Dropdown/index.tsx @@ -6,7 +6,7 @@ import useOnClickOutside from 'use-onclickoutside'; export interface DropdownItem { title: string; - href?: string; + slug?: string; } type Props = { @@ -44,13 +44,16 @@ const Dropdown = ({ {children} {show && ( -
+
- {JSON.stringify(files)} + {isPodLoading && ( +
+ +
+ )} + +
+ +
+ +
+ +
) ); diff --git a/pages/login.tsx b/pages/login.tsx index 69c6e29..f7750f0 100644 --- a/pages/login.tsx +++ b/pages/login.tsx @@ -35,7 +35,6 @@ const Login: NextPage = () => { const onSubmitHandler = async (event: SyntheticEvent) => { event.preventDefault(); - console.log('onSubmitHandler'); const { data } = await login({ username, diff --git a/pages/pods/[slug].tsx b/pages/pods/[...slug].tsx similarity index 100% rename from pages/pods/[slug].tsx rename to pages/pods/[...slug].tsx diff --git a/styles/theme.scss b/styles/theme.scss index d80809f..b7405e6 100644 --- a/styles/theme.scss +++ b/styles/theme.scss @@ -1,3 +1,3 @@ $color-purple: #434d7e; -$color-gray: #e2e8f8; +$color-gray: #e2e5ed; $color-blue: #e2e8f8; diff --git a/tailwind.config.js b/tailwind.config.js index 77a218b..510d6a6 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,11 +1,11 @@ module.exports = { - content: [ - // Example content paths... - './public/**/*.html', - './**/*.{ts,tsx}', - ], + content: ['./public/**/*.html', './**/*.{ts,tsx}'], theme: { - extend: {}, + extend: { + animation: { + 'spin-slow': 'spin 3s linear infinite', + }, + }, }, plugins: [require('@tailwindcss/aspect-ratio')], }; diff --git a/typings.d.ts b/typings.d.ts new file mode 100644 index 0000000..e69de29