Created
February 25, 2024 07:23
-
-
Save Sathiyapramod/092b34230d8b28d6e6d91329bdd9f80e to your computer and use it in GitHub Desktop.
Profile Page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ReduxProvider } from "@/redux/provider"; | |
import Login from "./components/Login"; | |
export default function RootLayout() { | |
return ( | |
<html lang="en"> | |
<body> | |
<ReduxProvider> | |
<Login /> | |
</ReduxProvider> | |
</body> | |
</html> | |
); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Profile/page.js | |
"use client"; | |
import React from "react"; | |
import { useSelector } from "react-redux"; | |
export default function Page() { | |
const username = useSelector((state) => state.rootReducer.username); | |
const password = useSelector((state) => state.rootReducer.password); | |
return ( | |
<div className="profile-container"> | |
<div> | |
<h3>Profile Details</h3> | |
<br /> | |
<div>Profile Name {username}</div> | |
<div>Password: {password}</div> | |
</div> | |
</div> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment