Skip to content

Commit

Permalink
πŸ”₯ chore: move directory. pages to src/pages
Browse files Browse the repository at this point in the history
  • Loading branch information
0jaaack committed Mar 22, 2023
1 parent 041ed12 commit ef9677c
Show file tree
Hide file tree
Showing 14 changed files with 41 additions and 36 deletions.
2 changes: 1 addition & 1 deletion __test__/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { render, screen } from "@testing-library/react";

import { RecoilRoot } from "recoil";

import PageLanding from "@/pages/index";
import PageLanding from "src/pages/index";

describe("PageLanding", () => {
it("renders PageLanding unchanged", () => {
Expand Down
2 changes: 1 addition & 1 deletion __test__/login.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { render, screen } from "@testing-library/react";

import { RecoilRoot } from "recoil";

import Login from "@/pages/login";
import Login from "src/pages/login";

jest.mock("next/router", () => ({
useRouter() {
Expand Down
32 changes: 0 additions & 32 deletions pages/_app.tsx

This file was deleted.

File renamed without changes.
37 changes: 37 additions & 0 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import type { AppProps } from "next/app";
import { RecoilRoot } from "recoil";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";

import { ThemeProvider, CssBaseline, Divider } from "@mui/material";

import { isMobile } from "react-device-detect";

import MobileDefense from "src/components/modal/MobileDefense";
import ModalGlobal from "src/components/modal/ModalGlobal";
import NavBar from "src/components/Navbar";
import theme from "src/utils/theme";
import "../public/fonts/style.css";

const queryClient = new QueryClient();

export default function App({ Component, pageProps }: AppProps) {
return (
<QueryClientProvider client={queryClient}>
<ThemeProvider theme={theme}>
<RecoilRoot>
<CssBaseline />
{isMobile ? (
<MobileDefense />
) : (
<>
<ModalGlobal />
<NavBar />
<Divider />
<Component {...pageProps} />
</>
)}
</RecoilRoot>
</ThemeProvider>
</QueryClientProvider>
);
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import Config from "src/config";
import isEmpty from "src/utils/isEmpty";

import { UserDeploymentData } from "types/deployment";
import deployMockData from "../../../../__test__/mock/deployData.json";
import deployMockData from "../../../../../__test__/mock/deployData.json";

function Deploy() {
const userDeploymentList =
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { BLUE } from "src/constants/colors";

import { userDeploymentsState } from "src/recoil/userDeployments";

import deployMockData from "../../../../__test__/mock/deployData.json";
import deployMockData from "../../../../../__test__/mock/deployData.json";

function Preview() {
const deploymentData = useRecoilValue(userDeploymentsState);
Expand Down
File renamed without changes.

0 comments on commit ef9677c

Please sign in to comment.