From ed4da4feb869292f0b6bf973a1ef85295b93757d Mon Sep 17 00:00:00 2001 From: Sigrid <55406589+sigtheidiot@users.noreply.github.com> Date: Mon, 9 Oct 2023 13:48:15 +0200 Subject: [PATCH] Update frontend project structure (#108) Co-authored-by: Sigrid Elnan --- frontend/{src/app => public}/favicon.ico | Bin frontend/public/{ => images}/variant-logo-1.svg | 0 frontend/public/next.svg | 1 - frontend/public/vercel.svg | 1 - frontend/src/app/layout.tsx | 2 +- frontend/src/app/page.tsx | 2 +- frontend/src/{app => }/components/AppProviders.tsx | 2 +- frontend/src/{app => }/components/PageLayout.tsx | 0 .../components/ThemeRegistry/ThemeRegistry.tsx | 0 .../src/{app => }/components/ThemeRegistry/theme.ts | 0 frontend/src/{app => }/components/VibesNavBar.tsx | 2 +- .../src/{app => }/components/VibesNavBarTabs.tsx | 0 frontend/src/{app => components}/variants.tsx | 2 +- .../components/vibes-buttons/SignInButton.tsx | 0 .../vibes-buttons/SignInSignOutButton.tsx | 0 .../components/vibes-buttons/SignOutButton.tsx | 0 frontend/src/{app => }/hooks/useVibesApi.ts | 0 frontend/src/utils/ApiUtils.ts | 2 +- frontend/src/{app => utils}/msalInstance.ts | 0 19 files changed, 6 insertions(+), 8 deletions(-) rename frontend/{src/app => public}/favicon.ico (100%) rename frontend/public/{ => images}/variant-logo-1.svg (100%) delete mode 100644 frontend/public/next.svg delete mode 100644 frontend/public/vercel.svg rename frontend/src/{app => }/components/AppProviders.tsx (96%) rename frontend/src/{app => }/components/PageLayout.tsx (100%) rename frontend/src/{app => }/components/ThemeRegistry/ThemeRegistry.tsx (100%) rename frontend/src/{app => }/components/ThemeRegistry/theme.ts (100%) rename frontend/src/{app => }/components/VibesNavBar.tsx (94%) rename frontend/src/{app => }/components/VibesNavBarTabs.tsx (100%) rename frontend/src/{app => components}/variants.tsx (95%) rename frontend/src/{app => }/components/vibes-buttons/SignInButton.tsx (100%) rename frontend/src/{app => }/components/vibes-buttons/SignInSignOutButton.tsx (100%) rename frontend/src/{app => }/components/vibes-buttons/SignOutButton.tsx (100%) rename frontend/src/{app => }/hooks/useVibesApi.ts (100%) rename frontend/src/{app => utils}/msalInstance.ts (100%) diff --git a/frontend/src/app/favicon.ico b/frontend/public/favicon.ico similarity index 100% rename from frontend/src/app/favicon.ico rename to frontend/public/favicon.ico diff --git a/frontend/public/variant-logo-1.svg b/frontend/public/images/variant-logo-1.svg similarity index 100% rename from frontend/public/variant-logo-1.svg rename to frontend/public/images/variant-logo-1.svg diff --git a/frontend/public/next.svg b/frontend/public/next.svg deleted file mode 100644 index 5174b28c..00000000 --- a/frontend/public/next.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/frontend/public/vercel.svg b/frontend/public/vercel.svg deleted file mode 100644 index d2f84222..00000000 --- a/frontend/public/vercel.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/frontend/src/app/layout.tsx b/frontend/src/app/layout.tsx index dace5faf..8aa57de8 100644 --- a/frontend/src/app/layout.tsx +++ b/frontend/src/app/layout.tsx @@ -1,5 +1,5 @@ import Head from 'next/head'; -import AppProviders from './components/AppProviders'; +import AppProviders from '../components/AppProviders'; export default function RootLayout({ children }: { children: React.ReactNode }) { return ( diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx index 24264cbe..d6263d46 100644 --- a/frontend/src/app/page.tsx +++ b/frontend/src/app/page.tsx @@ -1,4 +1,4 @@ -import { VariantList } from "./variants"; +import { VariantList } from "../components/variants"; export default function Page() { diff --git a/frontend/src/app/components/AppProviders.tsx b/frontend/src/components/AppProviders.tsx similarity index 96% rename from frontend/src/app/components/AppProviders.tsx rename to frontend/src/components/AppProviders.tsx index 441d41da..cfee9b12 100644 --- a/frontend/src/app/components/AppProviders.tsx +++ b/frontend/src/components/AppProviders.tsx @@ -3,7 +3,7 @@ import { EventType } from "@azure/msal-browser"; import { MsalProvider } from "@azure/msal-react"; import { CssBaseline } from "@mui/material"; import { QueryClient, QueryClientProvider } from "react-query"; -import { msalInstance } from "../msalInstance"; +import { msalInstance } from "../utils/msalInstance"; import PageLayout from "./PageLayout"; import ThemeRegistry from "./ThemeRegistry/ThemeRegistry"; diff --git a/frontend/src/app/components/PageLayout.tsx b/frontend/src/components/PageLayout.tsx similarity index 100% rename from frontend/src/app/components/PageLayout.tsx rename to frontend/src/components/PageLayout.tsx diff --git a/frontend/src/app/components/ThemeRegistry/ThemeRegistry.tsx b/frontend/src/components/ThemeRegistry/ThemeRegistry.tsx similarity index 100% rename from frontend/src/app/components/ThemeRegistry/ThemeRegistry.tsx rename to frontend/src/components/ThemeRegistry/ThemeRegistry.tsx diff --git a/frontend/src/app/components/ThemeRegistry/theme.ts b/frontend/src/components/ThemeRegistry/theme.ts similarity index 100% rename from frontend/src/app/components/ThemeRegistry/theme.ts rename to frontend/src/components/ThemeRegistry/theme.ts diff --git a/frontend/src/app/components/VibesNavBar.tsx b/frontend/src/components/VibesNavBar.tsx similarity index 94% rename from frontend/src/app/components/VibesNavBar.tsx rename to frontend/src/components/VibesNavBar.tsx index 79b86a90..7299e077 100644 --- a/frontend/src/app/components/VibesNavBar.tsx +++ b/frontend/src/components/VibesNavBar.tsx @@ -16,7 +16,7 @@ export default function VibesAppBar() { - Variant logo + Variant logo diff --git a/frontend/src/app/components/VibesNavBarTabs.tsx b/frontend/src/components/VibesNavBarTabs.tsx similarity index 100% rename from frontend/src/app/components/VibesNavBarTabs.tsx rename to frontend/src/components/VibesNavBarTabs.tsx diff --git a/frontend/src/app/variants.tsx b/frontend/src/components/variants.tsx similarity index 95% rename from frontend/src/app/variants.tsx rename to frontend/src/components/variants.tsx index c3eb7112..893703a5 100644 --- a/frontend/src/app/variants.tsx +++ b/frontend/src/components/variants.tsx @@ -5,7 +5,7 @@ import { FormControlLabel, FormGroup, } from "@mui/material"; -import useVibesApi from "./hooks/useVibesApi"; +import useVibesApi from "../hooks/useVibesApi"; import React, { useState } from "react"; export function VariantList() { diff --git a/frontend/src/app/components/vibes-buttons/SignInButton.tsx b/frontend/src/components/vibes-buttons/SignInButton.tsx similarity index 100% rename from frontend/src/app/components/vibes-buttons/SignInButton.tsx rename to frontend/src/components/vibes-buttons/SignInButton.tsx diff --git a/frontend/src/app/components/vibes-buttons/SignInSignOutButton.tsx b/frontend/src/components/vibes-buttons/SignInSignOutButton.tsx similarity index 100% rename from frontend/src/app/components/vibes-buttons/SignInSignOutButton.tsx rename to frontend/src/components/vibes-buttons/SignInSignOutButton.tsx diff --git a/frontend/src/app/components/vibes-buttons/SignOutButton.tsx b/frontend/src/components/vibes-buttons/SignOutButton.tsx similarity index 100% rename from frontend/src/app/components/vibes-buttons/SignOutButton.tsx rename to frontend/src/components/vibes-buttons/SignOutButton.tsx diff --git a/frontend/src/app/hooks/useVibesApi.ts b/frontend/src/hooks/useVibesApi.ts similarity index 100% rename from frontend/src/app/hooks/useVibesApi.ts rename to frontend/src/hooks/useVibesApi.ts diff --git a/frontend/src/utils/ApiUtils.ts b/frontend/src/utils/ApiUtils.ts index c9cdbfbf..afcab0d9 100644 --- a/frontend/src/utils/ApiUtils.ts +++ b/frontend/src/utils/ApiUtils.ts @@ -1,4 +1,4 @@ -import { msalInstance } from "@/app/msalInstance"; +import { msalInstance } from "@/utils/msalInstance"; import { loginRequest } from "@/authConfig"; export async function fetchWithToken(path: string) { diff --git a/frontend/src/app/msalInstance.ts b/frontend/src/utils/msalInstance.ts similarity index 100% rename from frontend/src/app/msalInstance.ts rename to frontend/src/utils/msalInstance.ts