Skip to content

Commit

Permalink
Merge pull request #43 from cherryontech/kat-sign-up-page-86azggkpu
Browse files Browse the repository at this point in the history
First stage of signup page -not finished yet, but we need to merge it
  • Loading branch information
KatKowalik authored Apr 10, 2024
2 parents 233ae75 + a01905d commit 60a2427
Show file tree
Hide file tree
Showing 8 changed files with 460 additions and 186 deletions.
16 changes: 16 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"react-chartjs-2": "^5.2.0",
"react-copy-to-clipboard": "^5.1.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.51.1",
"react-router": "^6.17.0",
"react-router-dom": "^6.17.0",
"react-swipeable-list": "^1.9.3",
Expand Down
2 changes: 2 additions & 0 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import AboutUsPage from './pages/AboutUsPage/AboutUsPage';
import TutorialPage from './components/TutorialPage/TutorialPage';
import ShareSpoonfull from './pages/ShareSpoonfull/ShareSpoonfull';
import Navbar from './components/Navbar/Navbar';
import SignUpPage from './pages/SignUpPage/SignUpPage';
import "@fontsource/lato";
import "@fontsource/lato/400.css";
import "@fontsource/lato/700.css";
Expand Down Expand Up @@ -112,6 +113,7 @@ function App() {
<Route path="/faq" element={<FAQ />} />
<Route path="/aboutus" element={<AboutUsPage />} />
<Route path="/sharespoonfull" element={<ShareSpoonfull />} />
<Route path="/signup" element={<SignUpPage />} />
</Routes>
</BrowserRouter>
)
Expand Down
22 changes: 22 additions & 0 deletions src/components/InputField/InputField.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/* eslint-disable react/prop-types */
import { useForm } from "react-hook-form";

const InputField = ({ name, label, type }) => {
const { register } = useForm();

return (
<div className="mt-4">
<label>{label}</label>
<input
{...register(name, {
required: true,
message: "This field is required",
})}
className="text-body w-full h-12 mt-2 p-4 rounded border-border border"
type={type}
/>
</div>
);
};

export default InputField;
Loading

0 comments on commit 60a2427

Please sign in to comment.