Skip to content

Commit

Permalink
import login form containers to routes
Browse files Browse the repository at this point in the history
  • Loading branch information
gnimnix committed Mar 16, 2024
1 parent ab7418a commit 9c303bd
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 113 deletions.
68 changes: 0 additions & 68 deletions src/assets/css/index.css

This file was deleted.

42 changes: 0 additions & 42 deletions src/assets/css/testpage.css

This file was deleted.

4 changes: 2 additions & 2 deletions src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { QueryClient, QueryClientProvider } from "@tanstack/react-query"
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
import { RouterProvider } from "react-router-dom";

import router from "./routes/router.tsx";
import './assets/css/reset.css'
import router from "routes/router.tsx";
import 'css/reset.css'

const queryClient = new QueryClient()

Expand Down
13 changes: 13 additions & 0 deletions src/routes/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { useWindowSize } from "@uidotdev/usehooks";

import MobileLoginContainer from "components/authentication/MobileLoginContainer.tsx";
import WebLoginContainer from "components/authentication/WebLoginContainer.tsx";
import { BREAKPOINTS } from "components/constants.tsx";


const App = () => {
const size = useWindowSize();
return size.width && size.width <= BREAKPOINTS.MD ? <MobileLoginContainer/> : <WebLoginContainer/>;
};

export default App
5 changes: 5 additions & 0 deletions src/routes/router.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import { createBrowserRouter } from "react-router-dom";
import TestPage from "./shared/TestPage.tsx";
import App from "./App.tsx"


const router = createBrowserRouter([
{
path: "/",
Component: App
},
{
path: "/test",
Component: TestPage,
Expand Down
2 changes: 1 addition & 1 deletion src/routes/shared/TestPage.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useState } from "react";
import { useQuery } from "@tanstack/react-query";

import viteLogo from "/vite.svg";
import reactLogo from "/react.svg";
import "css/testpage.css"
import resolveURL from "@/api/fetch.ts";


Expand Down

0 comments on commit 9c303bd

Please sign in to comment.