Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

619 create the user information component #628

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/pages/components/UserInformation/UserInfo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Heading } from '@chakra-ui/react';
import React from 'react';

const UserInfo = () => (
<div className="w-full lg:text-left mt-6">
<Heading as="h4">User Information</Heading>
<p>Name: David Ndubuisi </p>
<p>Email: [email protected]</p>
<p>Total Daily Usage: 54</p>
</div>
);

export default UserInfo;
3 changes: 3 additions & 0 deletions src/pages/components/UserInformation/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import UserInfo from './UserInfo';

export default UserInfo;
23 changes: 21 additions & 2 deletions src/pages/dashboard.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
import { Heading } from '@chakra-ui/react';
import React from 'react';
import { useTranslation } from 'react-i18next';
import UserInfo from './components/UserInformation';
import Navbar from './components/Navbar';

const Dashboard = () => <Heading as="h1">Dashboard</Heading>;
const Dashboard = () => {
const { t } = useTranslation('dashboard');

return (
<div className="flex flex-col items-center h-screen">
<Navbar to="/" />
<div
className="flex flex-col px-8 mb-6 lg:justify-between xl:flex-row pt-10
lg:pt-32 max-w-2xl lg:max-w-6xl h-full text-gray-800 text-lg lg:text-xl w-full"
>
<div className="max-w-3xl space-y-4 mb-10 text-gray-600">
<h1 className="text-3xl text-gray-700">{t('Dashboard')}</h1>
<UserInfo />
</div>
</div>
</div>
);
};

export default Dashboard;