From bf98b1caacfcfa11086725af361b9c0da224bee2 Mon Sep 17 00:00:00 2001 From: harsh mittal Date: Fri, 23 Jun 2023 01:06:16 +0530 Subject: [PATCH] cleaning and styling --- backend/.github/actions/setup/action.yml | 11 +++ backend/.github/workflows/main.yml | 28 +++++++ backend/.husky/pre-commit | 4 + frontend/components/InstructionsComponent.jsx | 82 ++----------------- frontend/components/navigation/navbar.jsx | 16 ++-- frontend/package.json | 5 +- frontend/styles/globals.css | 59 ++++++++----- 7 files changed, 100 insertions(+), 105 deletions(-) create mode 100644 backend/.github/actions/setup/action.yml create mode 100644 backend/.github/workflows/main.yml create mode 100644 backend/.husky/pre-commit diff --git a/backend/.github/actions/setup/action.yml b/backend/.github/actions/setup/action.yml new file mode 100644 index 0000000..0febb4e --- /dev/null +++ b/backend/.github/actions/setup/action.yml @@ -0,0 +1,11 @@ +name: Setup +description: Runs basic commands to install dependencies +runs: + using: "composite" + steps: + - uses: actions/setup-node@v3 + with: + node-version: 18 + - name: npm install + run: npm install + shell: bash diff --git a/backend/.github/workflows/main.yml b/backend/.github/workflows/main.yml new file mode 100644 index 0000000..f86f546 --- /dev/null +++ b/backend/.github/workflows/main.yml @@ -0,0 +1,28 @@ +name: Test & build + +on: + push: + branches: + - main + pull_request: ~ + +concurrency: + group: main-${{ github.ref }} + cancel-in-progress: true + +jobs: + run-unit-tests: + name: Run unit tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup + - run: npm run test:unit + + run-basic-checks: + name: Run linters + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup + - run: npm run lint diff --git a/backend/.husky/pre-commit b/backend/.husky/pre-commit new file mode 100644 index 0000000..a16d8b1 --- /dev/null +++ b/backend/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname "$0")/_/husky.sh" + +npx lint-staged diff --git a/frontend/components/InstructionsComponent.jsx b/frontend/components/InstructionsComponent.jsx index b5316ca..2fa018d 100644 --- a/frontend/components/InstructionsComponent.jsx +++ b/frontend/components/InstructionsComponent.jsx @@ -1,80 +1,12 @@ import styles from "../styles/InstructionsComponent.module.css"; import Router, { useRouter } from "next/router"; export default function InstructionsComponent() { - const router = useRouter(); - return ( -
-
-

- create-web3-dapp -

-

- Get started by editing this page in{" "} - /pages/index.js -

-
+ const router = useRouter(); + return ( +
+
-
- -
- {/* */} -

Add Components

-
-
- -
- {/* */} -

Explore Templates

-
-
- -
- -

Visit Docs

-
-
-
-
- - Alchemy Supercharged - -
- - -
-
-
- ); +
+
+ ); } diff --git a/frontend/components/navigation/navbar.jsx b/frontend/components/navigation/navbar.jsx index 7e285ae..5057b91 100644 --- a/frontend/components/navigation/navbar.jsx +++ b/frontend/components/navigation/navbar.jsx @@ -1,12 +1,12 @@ import { ConnectButton } from "@rainbow-me/rainbowkit"; import styles from "../../styles/Navbar.module.css"; export default function Navbar() { - return ( - - ); + return ( + + ); } diff --git a/frontend/package.json b/frontend/package.json index 4b5ea96..07d47da 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -10,17 +10,20 @@ "marketplace": "npx create-web3-dapp marketplace" }, "dependencies": { + "@mui/material": "^5.13.5", + "@mui/styled-engine-sc": "^5.12.0", "@rainbow-me/rainbowkit": "^0.12.15", "alchemy-sdk": "^2.6.2", "dotenv": "^16.3.1", "next": "13.1.2", "react": "18.2.0", "react-dom": "18.2.0", + "styled-components": "^5.3.11", "viem": "^1.0.7", "wagmi": "^0.12.16" }, "devDependencies": { "eslint": "8.36.0", - "eslint-config-next": "13.2.4" + "eslint-config-next": "^12.0.4" } } diff --git a/frontend/styles/globals.css b/frontend/styles/globals.css index 409a3d4..5d29aaa 100644 --- a/frontend/styles/globals.css +++ b/frontend/styles/globals.css @@ -1,38 +1,55 @@ -@import url('https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300;0,500;1,400&display=swap'); +@import url("https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300;0,500;1,400&display=swap"); html, body { - background-color: black; - font-family: 'Rubik'; - font-weight: normal; + background: rgb(14, 14, 16); + background: -moz-linear-gradient( + 90deg, + rgba(14, 14, 16, 1) 0%, + rgba(15, 15, 16, 1) 35%, + rgba(13, 13, 14, 1) 100% + ); + background: -webkit-linear-gradient( + 90deg, + rgba(14, 14, 16, 1) 0%, + rgba(15, 15, 16, 1) 35%, + rgba(13, 13, 14, 1) 100% + ); + background: linear-gradient( + 90deg, + rgba(14, 14, 16, 1) 0%, + rgba(15, 15, 16, 1) 35%, + rgba(13, 13, 14, 1) 100% + ); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#0e0e10",endColorstr="#0d0d0e",GradientType=1); + font-family: "Rubik"; + font-weight: normal; } -h1{ - margin-bottom: 1rem; +h1 { + margin-bottom: 1rem; } -h2{ - margin-bottom: .5rem; - font-weight: normal; - +h2 { + margin-bottom: 0.5rem; + font-weight: normal; } -p{ - line-height: 1.5rem; - font-weight: lighter; - +p { + line-height: 1.5rem; + font-weight: lighter; } a { - color: inherit; - text-decoration: none; + color: inherit; + text-decoration: none; } * { - box-sizing: border-box; - padding: 0; - margin: 0; + box-sizing: border-box; + padding: 0; + margin: 0; } @media (prefers-color-scheme: dark) { - html { - } + html { + } }