From 1744c7a96a3ab85ea9ec9269d5d6a669bee1fa92 Mon Sep 17 00:00:00 2001 From: Lea Date: Thu, 18 Jan 2024 08:01:23 +0100 Subject: [PATCH] refactor --- src/app/layout.tsx | 6 +++--- src/lib/components/{ => wrapper}/AuthWrapper.tsx | 4 ++-- src/lib/components/{ => wrapper}/NavigationWrapper.tsx | 4 ++-- src/lib/components/{ => wrapper}/ThemeWrapper.tsx | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) rename src/lib/components/{ => wrapper}/AuthWrapper.tsx (93%) rename src/lib/components/{ => wrapper}/NavigationWrapper.tsx (82%) rename src/lib/components/{ => wrapper}/ThemeWrapper.tsx (87%) diff --git a/src/app/layout.tsx b/src/app/layout.tsx index d64de69..41e2a96 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,9 +1,9 @@ import type { Metadata } from 'next'; -import ThemeWrapper from '@/lib/components/ThemeWrapper'; +import ThemeWrapper from '@/lib/components/wrapper/ThemeWrapper'; import './globals.css'; -import AuthWrapper from '@/lib/components/AuthWrapper'; +import AuthWrapper from '@/lib/components/wrapper/AuthWrapper'; import { getServerSession } from 'next-auth'; -import NavigationWrapper from '@/lib/components/NavigationWrapper'; +import NavigationWrapper from '@/lib/components/wrapper/NavigationWrapper'; import { ThemePanel } from '@radix-ui/themes'; import BackgroundImage from '@/lib/components/ui/BackgroundImage'; diff --git a/src/lib/components/AuthWrapper.tsx b/src/lib/components/wrapper/AuthWrapper.tsx similarity index 93% rename from src/lib/components/AuthWrapper.tsx rename to src/lib/components/wrapper/AuthWrapper.tsx index df9e20b..88d0713 100644 --- a/src/lib/components/AuthWrapper.tsx +++ b/src/lib/components/wrapper/AuthWrapper.tsx @@ -3,8 +3,8 @@ import { Button, Flex, Heading, Text, Link } from "@radix-ui/themes"; import { Session } from "next-auth"; import { SessionProvider, signIn } from "next-auth/react"; -import useThemePreference from "../hooks/useThemePreference"; -import { WEBMAIL_URL } from "../constants"; +import useThemePreference from "../../hooks/useThemePreference"; +import { WEBMAIL_URL } from "../../constants"; export default function AuthWrapper({ children, diff --git a/src/lib/components/NavigationWrapper.tsx b/src/lib/components/wrapper/NavigationWrapper.tsx similarity index 82% rename from src/lib/components/NavigationWrapper.tsx rename to src/lib/components/wrapper/NavigationWrapper.tsx index 25cbc09..638fddc 100644 --- a/src/lib/components/NavigationWrapper.tsx +++ b/src/lib/components/wrapper/NavigationWrapper.tsx @@ -1,8 +1,8 @@ "use client"; import { Flex } from "@radix-ui/themes"; -import useWindowDimensions from "../hooks/useWindowDimensions"; -import NavigationPanel from "./ui/NavigationPanel"; +import useWindowDimensions from "../../hooks/useWindowDimensions"; +import NavigationPanel from "../ui/NavigationPanel"; export default function NavigationWrapper({ children, diff --git a/src/lib/components/ThemeWrapper.tsx b/src/lib/components/wrapper/ThemeWrapper.tsx similarity index 87% rename from src/lib/components/ThemeWrapper.tsx rename to src/lib/components/wrapper/ThemeWrapper.tsx index 8202d23..c36d4d6 100644 --- a/src/lib/components/ThemeWrapper.tsx +++ b/src/lib/components/wrapper/ThemeWrapper.tsx @@ -3,7 +3,7 @@ import '@radix-ui/themes/styles.css'; import { Theme } from "@radix-ui/themes"; import { useEffect, useState } from 'react'; -import useThemePreference from '../hooks/useThemePreference'; +import useThemePreference from '../../hooks/useThemePreference'; export default function ThemeWrapper({ children,