From a54723ed4031a57e924279d0f23e3284fd7add2b Mon Sep 17 00:00:00 2001 From: Lucas Silva Date: Mon, 8 Apr 2024 20:43:03 -0300 Subject: [PATCH] refactored folders structures and nomenclature standarsization, also iniciated build in login component --- package-lock.json | 39 ++++++++ package.json | 1 + src/App.tsx | 17 ++-- src/components/Login/index.tsx | 4 - src/pages/Home/index.tsx | 7 ++ src/pages/Login/Login.css | 0 src/pages/Login/index.tsx | 89 +++++++++++++++++++ .../Cadastro => pages/Registration}/index.tsx | 4 +- tailwind.config.js | 4 +- 9 files changed, 152 insertions(+), 13 deletions(-) delete mode 100644 src/components/Login/index.tsx create mode 100644 src/pages/Home/index.tsx create mode 100644 src/pages/Login/Login.css create mode 100644 src/pages/Login/index.tsx rename src/{components/Cadastro => pages/Registration}/index.tsx (97%) diff --git a/package-lock.json b/package-lock.json index 3ed4bd8..a026332 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "postcss": "^8.4.37", "react": "^18.2.0", "react-dom": "^18.2.0", + "react-router-dom": "^6.22.3", "tailwindcss": "^3.4.1" }, "devDependencies": { @@ -1047,6 +1048,14 @@ "node": ">=14" } }, + "node_modules/@remix-run/router": { + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.15.3.tgz", + "integrity": "sha512-Oy8rmScVrVxWZVOpEF57ovlnhpZ8CCPlnIIumVcV9nFdiSIrus99+Lw78ekXyGvVDlIsFJbSfmSovJUhCWYV3w==", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@rollup/rollup-android-arm-eabi": { "version": "4.13.0", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.13.0.tgz", @@ -3330,6 +3339,36 @@ "node": ">=0.10.0" } }, + "node_modules/react-router": { + "version": "6.22.3", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.22.3.tgz", + "integrity": "sha512-dr2eb3Mj5zK2YISHK++foM9w4eBnO23eKnZEDs7c880P6oKbrjz/Svg9+nxqtHQK+oMW4OtjZca0RqPglXxguQ==", + "dependencies": { + "@remix-run/router": "1.15.3" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "react": ">=16.8" + } + }, + "node_modules/react-router-dom": { + "version": "6.22.3", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.22.3.tgz", + "integrity": "sha512-7ZILI7HjcE+p31oQvwbokjk6OA/bnFxrhJ19n82Ex9Ph8fNAq+Hm/7KchpMGlTgWhUxRHMMCut+vEtNpWpowKw==", + "dependencies": { + "@remix-run/router": "1.15.3", + "react-router": "6.22.3" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "react": ">=16.8", + "react-dom": ">=16.8" + } + }, "node_modules/read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", diff --git a/package.json b/package.json index e00ea00..b73793a 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "postcss": "^8.4.37", "react": "^18.2.0", "react-dom": "^18.2.0", + "react-router-dom": "^6.22.3", "tailwindcss": "^3.4.1" }, "devDependencies": { diff --git a/src/App.tsx b/src/App.tsx index ef580cc..5b622aa 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,11 +1,16 @@ -import { Cadastro } from "./components/Cadastro"; -import { Login } from "./components/Login"; +import { BrowserRouter, Route, Routes } from "react-router-dom"; +import Home from "./pages/Home"; +import Registration from "./pages/Registration"; +import Login from "./pages/Login"; export default function App() { return ( - <> - - - + + + } /> + } /> + } /> + + ); } diff --git a/src/components/Login/index.tsx b/src/components/Login/index.tsx deleted file mode 100644 index c008c72..0000000 --- a/src/components/Login/index.tsx +++ /dev/null @@ -1,4 +0,0 @@ -export const Login = () => { - return <> - -}; diff --git a/src/pages/Home/index.tsx b/src/pages/Home/index.tsx new file mode 100644 index 0000000..a9cdeb7 --- /dev/null +++ b/src/pages/Home/index.tsx @@ -0,0 +1,7 @@ +const Home = () => { + return ( +

Home do site!

+ ) +} + +export default Home; \ No newline at end of file diff --git a/src/pages/Login/Login.css b/src/pages/Login/Login.css new file mode 100644 index 0000000..e69de29 diff --git a/src/pages/Login/index.tsx b/src/pages/Login/index.tsx new file mode 100644 index 0000000..27d65bd --- /dev/null +++ b/src/pages/Login/index.tsx @@ -0,0 +1,89 @@ +const Login = () => { + return ( +
+
+ Your Company +

+ Sign in to your account +

+
+ +
+
+
+ +
+ +
+
+ +
+
+ + +
+
+ +
+
+ +
+ +
+
+ +

+ Not a member? + + Start a 14 day free trial + +

+
+
+ ); +}; + +export default Login; diff --git a/src/components/Cadastro/index.tsx b/src/pages/Registration/index.tsx similarity index 97% rename from src/components/Cadastro/index.tsx rename to src/pages/Registration/index.tsx index 1d572f6..1b291b2 100644 --- a/src/components/Cadastro/index.tsx +++ b/src/pages/Registration/index.tsx @@ -1,4 +1,4 @@ -export const Cadastro = () => { +const Registration = () => { return ( <>
@@ -67,3 +67,5 @@ export const Cadastro = () => { ); }; + +export default Registration; \ No newline at end of file diff --git a/tailwind.config.js b/tailwind.config.js index c4dfe41..4f43519 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,7 +1,7 @@ export default { content: [ "./index.html", - "./src/**/*.tsx", + "./src/**/*.{js,ts,jsx,tsx}", ], theme: { extend: { @@ -15,5 +15,5 @@ export default { } }, }, - plugins: [], + plugins: [('@tailwindcss/forms')], } \ No newline at end of file