-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into abu-hasib-patch-3
- Loading branch information
Showing
37 changed files
with
7,605 additions
and
1,861 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
API_USER= | ||
API_PASSWORD= |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"extends": [ | ||
"next/core-web-vitals", | ||
"prettier", | ||
"plugin:tailwindcss/recommended" | ||
], | ||
"plugins": ["tailwindcss"], | ||
"rules": { | ||
"tailwindcss/no-custom-classname": "off", | ||
"tailwindcss/classnames-order": "warn" | ||
}, | ||
"settings": { | ||
"tailwindcss": { | ||
"callees": ["cn"], | ||
"config": "tailwind.config.js" | ||
}, | ||
"next": { | ||
"rootDir": true | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
cd cubeseed_login | ||
npx pretty-quick --staged | ||
npm run pre-commit |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
dist | ||
node_modules | ||
.next | ||
build | ||
.contentlayer |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"endOfLine": "lf", | ||
"semi": false, | ||
"singleQuote": false, | ||
"tabWidth": 2, | ||
"trailingComma": "es5", | ||
"plugins": ["prettier-plugin-tailwindcss"] | ||
} |
File renamed without changes.
15 changes: 8 additions & 7 deletions
15
...ogin/app/(processor)/dashboard/layout.tsx → ...d_login/app/(farmer)/dashboard/layout.tsx
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,28 @@ | ||
import Navbar from "@/component/navbar/Navbar"; | ||
import DashboardNavbar from "@/component/dashboard/DashboardNavbar/DashboardNavbar"; | ||
import Navbar from "@/component/navbar/Navbar" | ||
import DashboardNavbar from "@/component/dashboard/DashboardNavbar/DashboardNavbar" | ||
import DashboardSidePannel from "@/component/dashboard/DashboardSidePannel" | ||
|
||
export const metadata = { | ||
title: "Next.js", | ||
description: "Generated by Next.js", | ||
}; | ||
} | ||
|
||
export default function DashboardLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
children: React.ReactNode | ||
}) { | ||
return ( | ||
<div className="flex min-h-screen flex-col"> | ||
<header className="sticky inset-0 "> | ||
<Navbar /> | ||
</header> | ||
<div> | ||
<aside className="w-[250px] h-screen fixed inset-0 bg-white shadow-2xl"> | ||
<DashboardNavbar /> | ||
<aside className="fixed inset-0 h-screen w-[250px] bg-white shadow-2xl"> | ||
<DashboardSidePannel /> | ||
</aside> | ||
<main className="ml-[250px]">{children}</main> | ||
</div> | ||
</div> | ||
); | ||
) | ||
} |
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import UserProfile from '@cs/components/profile' | ||
import React from 'react' | ||
const base64 = require("base-64") | ||
|
||
|
||
async function getUserProfile() { | ||
const login = process.env.API_USER | ||
const password = process.env.API_PASSWORD | ||
|
||
const response = await fetch( | ||
"http://ec2-16-171-43-115.eu-north-1.compute.amazonaws.com:8000/api/userprofile/1", | ||
{ | ||
headers: new Headers({ | ||
"Authorization": `Basic ${base64.encode(`${login}:${password}`)}` | ||
}), | ||
cache: 'no-store' | ||
} | ||
); | ||
return await response.json(); | ||
} | ||
|
||
async function ProfilePage() { | ||
const profile = await getUserProfile() | ||
|
||
return ( | ||
<div className='p-8'> | ||
<UserProfile profile={profile}/> | ||
</div> | ||
) | ||
} | ||
|
||
export default ProfilePage |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Oops, something went wrong.