-
Notifications
You must be signed in to change notification settings - Fork 172
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
Merge the first commit please ignore the second one. Kindly add GSSOC24 label to it #656
base: develop
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# Sample workflow for building and deploying a Next.js site to GitHub Pages | ||
# | ||
# To get started with Next.js see: https://nextjs.org/docs/getting-started | ||
# | ||
name: Deploy Next.js site to Pages | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
branches: ["test"] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow one concurrent deployment | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
# Build job | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Detect package manager | ||
id: detect-package-manager | ||
run: | | ||
if [ -f "${{ github.workspace }}/yarn.lock" ]; then | ||
echo "manager=yarn" >> $GITHUB_OUTPUT | ||
echo "command=install" >> $GITHUB_OUTPUT | ||
echo "runner=yarn" >> $GITHUB_OUTPUT | ||
exit 0 | ||
elif [ -f "${{ github.workspace }}/package.json" ]; then | ||
echo "manager=npm" >> $GITHUB_OUTPUT | ||
echo "command=ci" >> $GITHUB_OUTPUT | ||
echo "runner=npx --no-install" >> $GITHUB_OUTPUT | ||
exit 0 | ||
else | ||
echo "Unable to determine packager manager" | ||
exit 1 | ||
fi | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "16" | ||
cache: ${{ steps.detect-package-manager.outputs.manager }} | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v2 | ||
with: | ||
# Automatically inject basePath in your Next.js configuration file and disable | ||
# server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized). | ||
# | ||
# You may remove this line if you want to manage the configuration yourself. | ||
static_site_generator: next | ||
- name: Restore cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
.next/cache | ||
# Generate a new cache whenever packages or source files change. | ||
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} | ||
# If source files changed but packages didn't, rebuild from a prior cache. | ||
restore-keys: | | ||
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}- | ||
- name: Install dependencies | ||
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} | ||
- name: Build with Next.js | ||
run: ${{ steps.detect-package-manager.outputs.runner }} next build | ||
- name: Static HTML export with Next.js | ||
run: ${{ steps.detect-package-manager.outputs.runner }} next export | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: ./out | ||
|
||
# Deployment job | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -3,6 +3,7 @@ import { useRouter } from 'next/router'; | |||||||||||||||||||||||||||||||||
import styles from '@styles/Navbar.module.css'; | ||||||||||||||||||||||||||||||||||
import { useState, useEffect, useRef } from 'react'; | ||||||||||||||||||||||||||||||||||
import Image from 'node_modules/next/image'; | ||||||||||||||||||||||||||||||||||
import { FaKey } from 'react-icons/fa'; | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
const Navbar = () => { | ||||||||||||||||||||||||||||||||||
const checkboxRef = useRef(); | ||||||||||||||||||||||||||||||||||
|
@@ -368,6 +369,14 @@ const Navbar = () => { | |||||||||||||||||||||||||||||||||
Contact Us | ||||||||||||||||||||||||||||||||||
</a> | ||||||||||||||||||||||||||||||||||
</li> | ||||||||||||||||||||||||||||||||||
<li> | ||||||||||||||||||||||||||||||||||
<a | ||||||||||||||||||||||||||||||||||
onClick={() => router.push('/Login')} | ||||||||||||||||||||||||||||||||||
className="flex py-2 px-2 text-white hover:bg-sky-400 hover:text-black rounded-lg transition duration-500" | ||||||||||||||||||||||||||||||||||
> | ||||||||||||||||||||||||||||||||||
<FaKey /> | ||||||||||||||||||||||||||||||||||
</a> | ||||||||||||||||||||||||||||||||||
</li> | ||||||||||||||||||||||||||||||||||
Comment on lines
+372
to
+379
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure accessibility by replacing the anchor tag with a button. - <a onClick={() => router.push('/Login')} className="flex py-2 px-2 text-white hover:bg-sky-400 hover:text-black rounded-lg transition duration-500">
- <FaKey />
- </a>
+ <button onClick={() => router.push('/Login')} className="flex py-2 px-2 text-white hover:bg-sky-400 hover:text-black rounded-lg transition duration-500">
+ <FaKey />
+ </button> This change improves accessibility by using a Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||
</ul> | ||||||||||||||||||||||||||||||||||
</nav> | ||||||||||||||||||||||||||||||||||
</> | ||||||||||||||||||||||||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import mongoose from "mongoose"; | ||
|
||
const blogCommentSchema = new mongoose.Schema({ | ||
userName: { | ||
type: String, | ||
}, | ||
blogId: { | ||
type: String, | ||
required: true, | ||
}, | ||
message: { | ||
type: String, | ||
required: true, | ||
}, | ||
date: { | ||
type: String, | ||
required: true, | ||
} | ||
}); | ||
|
||
const BlogComment = mongoose.models.BlogComment || mongoose.model("BlogComment", blogCommentSchema); | ||
export default BlogComment; |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -11,16 +11,21 @@ | |||||||||||||||||||||
"@fortawesome/fontawesome-svg-core": "^1.2.36", | ||||||||||||||||||||||
"@fortawesome/free-brands-svg-icons": "^5.15.4", | ||||||||||||||||||||||
"@fortawesome/free-solid-svg-icons": "^5.15.4", | ||||||||||||||||||||||
<<<<<<< HEAD | ||||||||||||||||||||||
"@fortawesome/react-fontawesome": "^0.2.0", | ||||||||||||||||||||||
"aos": "^2.3.4", | ||||||||||||||||||||||
======= | ||||||||||||||||||||||
"@fortawesome/react-fontawesome": "^0.1.16", | ||||||||||||||||||||||
"@types/webidl-conversions": "^7.0.0", | ||||||||||||||||||||||
>>>>>>> 2e3ced3f1a6c1a70341b50aee0bde119b118a150 | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolve merge conflicts in the dependency list. - <<<<<<< HEAD
- @fortawesome/react-fontawesome": "^0.2.0",
- "aos": "^2.3.4",
- =======
- @fortawesome/react-fontawesome": "^0.1.16",
- @types/webidl-conversions": "^7.0.0",
- >>>>>>> 2e3ced3f1a6c1a70341b50aee0bde119b118a150
+ "@fortawesome/react-fontawesome": "^0.2.0",
+ "aos": "^2.3.4",
+ "@types/webidl-conversions": "^7.0.0", Committable suggestion
Suggested change
|
||||||||||||||||||||||
"axios": "^0.27.2", | ||||||||||||||||||||||
"bcryptjs": "^2.4.3", | ||||||||||||||||||||||
"framer-motion": "^5.5.5", | ||||||||||||||||||||||
"jsonwebtoken": "^9.0.0", | ||||||||||||||||||||||
"lodash": "^4.17.21", | ||||||||||||||||||||||
"markdown-it": "^13.0.1", | ||||||||||||||||||||||
"mongoose": "^7.2.1", | ||||||||||||||||||||||
"next": "^12.3.3", | ||||||||||||||||||||||
"next": "^12.3.4", | ||||||||||||||||||||||
"next-connect": "^1.0.0", | ||||||||||||||||||||||
"next-images": "^1.8.5", | ||||||||||||||||||||||
"prettier": "^2.8.1", | ||||||||||||||||||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -10,6 +10,7 @@ import { | |||||||||||||||||
} from "node_modules/@fortawesome/free-solid-svg-icons/index"; | ||||||||||||||||||
import { useContext, useState } from "react"; | ||||||||||||||||||
import { Store } from "utils/Store/Store"; | ||||||||||||||||||
import Link from 'next/link' | ||||||||||||||||||
|
||||||||||||||||||
const Login = () => { | ||||||||||||||||||
const { state, dispatch } = useContext(Store); | ||||||||||||||||||
|
@@ -95,6 +96,10 @@ const Login = () => { | |||||||||||||||||
<span>Forgot Password ?</span> | ||||||||||||||||||
</label> | ||||||||||||||||||
<button>Sign In</button> | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Specify the type of the button for better accessibility and validation. - <button>Sign In</button>
+ <button type="submit">Sign In</button> Explicitly setting the type of the button to "submit" clarifies its function within a form, improving both accessibility and form behavior. Committable suggestion
Suggested change
|
||||||||||||||||||
<h1 className="font-bold text-lg p-4">Or</h1> | ||||||||||||||||||
<Link href='/Signup'> | ||||||||||||||||||
<a className="font-sans text-sm font-bold text-white hover:italic bg-gradient-to-r from-indigo-800 to-purple-600 rounded-md px-24 py-1">Signup</a> | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct the anchor tag to include a - <a className="font-sans text-sm font-bold text-white hover:italic bg-gradient-to-r from-indigo-800 to-purple-600 rounded-md px-24 py-1">Signup</a>
+ <a href="/Signup" className="font-sans text-sm font-bold text-white hover:italic bg-gradient-to-r from-indigo-800 to-purple-600 rounded-md px-24 py-1">Signup</a> This fix ensures that the anchor tag correctly uses the Committable suggestion
Suggested change
|
||||||||||||||||||
</Link> | ||||||||||||||||||
Comment on lines
+99
to
+102
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure consistent styling for the "Or" separator. - <h1 className="font-bold text-lg p-4">Or</h1>
+ <p className={styles.or}>Or</p> This change ensures that the styling for the "Or" text is consistent throughout the application, using the styles defined in Committable suggestion
Suggested change
|
||||||||||||||||||
</form> | ||||||||||||||||||
</div> | ||||||||||||||||||
</main> | ||||||||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import React from 'react' | ||
|
||
const Signup = () => { | ||
return ( | ||
<div>Signup</div> | ||
) | ||
} | ||
|
||
export default Signup |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,5 +1,10 @@ | ||||||||||||||||||||||
<<<<<<< HEAD | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove merge conflict markers. - <<<<<<< HEAD
- import Navbar from "@comp/common/Navbar";
- import jwt from "jsonwebtoken";
- =======
- import Navbar from "@comp/Navbar";
- // import jwt from "jsonwebtoken";
- >>>>>>> 2e3ced3f1a6c1a70341b50aee0bde119b118a150
+ import Navbar from "@comp/Navbar"; This change resolves the merge conflict by choosing the updated import path for Also applies to: 3-4, 6-7 Committable suggestion
Suggested change
|
||||||||||||||||||||||
import Navbar from "@comp/common/Navbar"; | ||||||||||||||||||||||
import jwt from "jsonwebtoken"; | ||||||||||||||||||||||
======= | ||||||||||||||||||||||
import Navbar from "@comp/Navbar"; | ||||||||||||||||||||||
// import jwt from "jsonwebtoken"; | ||||||||||||||||||||||
>>>>>>> 2e3ced3f1a6c1a70341b50aee0bde119b118a150 | ||||||||||||||||||||||
import "@styles/globals.css"; | ||||||||||||||||||||||
import Head from "node_modules/next/head"; | ||||||||||||||||||||||
// import { useEffect } from 'react'; | ||||||||||||||||||||||
|
@@ -71,30 +76,31 @@ function MyApp({ Component, pageProps, router }) { | |||||||||||||||||||||
// } | ||||||||||||||||||||||
// }, []); | ||||||||||||||||||||||
|
||||||||||||||||||||||
return ( | ||||||||||||||||||||||
<StoreProvider> | ||||||||||||||||||||||
{/* <div id="signInDiv"></div> */} | ||||||||||||||||||||||
<Alert /> | ||||||||||||||||||||||
{/* <Login /> */} | ||||||||||||||||||||||
<motion.div | ||||||||||||||||||||||
key={router.route} | ||||||||||||||||||||||
initial="pageInitial" | ||||||||||||||||||||||
animate="pageAnimate" | ||||||||||||||||||||||
variants={{ | ||||||||||||||||||||||
pageInitial: { | ||||||||||||||||||||||
opacity: 0, | ||||||||||||||||||||||
}, | ||||||||||||||||||||||
pageAnimate: { | ||||||||||||||||||||||
opacity: 1, | ||||||||||||||||||||||
}, | ||||||||||||||||||||||
}} | ||||||||||||||||||||||
> | ||||||||||||||||||||||
<Head> | ||||||||||||||||||||||
{/* <script | ||||||||||||||||||||||
return ( | ||||||||||||||||||||||
<StoreProvider> | ||||||||||||||||||||||
{/* <div id="signInDiv"></div> */} | ||||||||||||||||||||||
<Alert /> | ||||||||||||||||||||||
{/* <Login /> */} | ||||||||||||||||||||||
<motion.div | ||||||||||||||||||||||
key={router.route} | ||||||||||||||||||||||
initial="pageInitial" | ||||||||||||||||||||||
animate="pageAnimate" | ||||||||||||||||||||||
variants={{ | ||||||||||||||||||||||
pageInitial: { | ||||||||||||||||||||||
opacity: 0, | ||||||||||||||||||||||
}, | ||||||||||||||||||||||
pageAnimate: { | ||||||||||||||||||||||
opacity: 1, | ||||||||||||||||||||||
}, | ||||||||||||||||||||||
}} | ||||||||||||||||||||||
> | ||||||||||||||||||||||
<Head> | ||||||||||||||||||||||
{/* <script | ||||||||||||||||||||||
async | ||||||||||||||||||||||
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-6172950963478417" | ||||||||||||||||||||||
crossOrigin="anonymous" | ||||||||||||||||||||||
></script> */} | ||||||||||||||||||||||
<<<<<<< HEAD | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolve syntax errors and remove merge conflict artifacts. - <<<<<<< HEAD
- =======
- >>>>>>> 2e3ced3f1a6c1a70341b50aee0bde119b118a150
- <HEAD
- <meta
- </HEAD>
- {blogData.map((blogItem) => (
- key={blogItem.id}
- id={blogItem.id}
- image={blogItem.image}
- comments={blogItem.comments}
- likes={blogItem.likes}
- class="hover:shadow-2xl hover:scale-150"
- =======
- key={blogItem.userId}
- id={index}
- title={blogItem.title}
- image={blogItem.coverImg}
- comments={blogItem.numberOfComments}
- likes={blogItem.like}
- >>>>>>> 2e3ced3f1a6c1a70341b50aee0bde119b118a150
+ // Properly close JSX tags and remove conflict markers This change cleans up the file by removing merge conflict markers and correcting JSX syntax errors, ensuring the file is syntactically correct. Also applies to: 105-105, 103-103, 97-97, 84-96, 80-80, 191-191, 191-191, 191-191, 191-193, 193-193, 193-202, 202-204, 203-203
|
||||||||||||||||||||||
|
||||||||||||||||||||||
<title>Amupedia</title> | ||||||||||||||||||||||
{/* Primary meta tags */} | ||||||||||||||||||||||
|
@@ -151,6 +157,50 @@ function MyApp({ Component, pageProps, router }) { | |||||||||||||||||||||
</motion.div> | ||||||||||||||||||||||
</StoreProvider> | ||||||||||||||||||||||
); | ||||||||||||||||||||||
======= | ||||||||||||||||||||||
<script | ||||||||||||||||||||||
src="https://accounts.google.com/gsi/client" | ||||||||||||||||||||||
async | ||||||||||||||||||||||
defer | ||||||||||||||||||||||
></script> | ||||||||||||||||||||||
Comment on lines
+102
to
+106
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. JSX elements without children should be self-closing. - <script src="https://accounts.google.com/gsi/client" async defer></script>
+ <script src="https://accounts.google.com/gsi/client" async defer /> Committable suggestion
Suggested change
|
||||||||||||||||||||||
<title>Amupedia</title> | ||||||||||||||||||||||
<meta | ||||||||||||||||||||||
name="description" | ||||||||||||||||||||||
content="Amupedia is an initiative to help college students pursuing B.Tech, B.E or B.Com, especially from AMU." | ||||||||||||||||||||||
/> | ||||||||||||||||||||||
<meta name="keywords" content="B.Tech, B.Com, B.E" /> | ||||||||||||||||||||||
<meta | ||||||||||||||||||||||
property="og:image" | ||||||||||||||||||||||
content="https://www.amupedia.com/og-image.jpg" | ||||||||||||||||||||||
/> | ||||||||||||||||||||||
<meta property="og:image:width" content="150" /> | ||||||||||||||||||||||
<meta property="og:image:height" content="150" /> | ||||||||||||||||||||||
<meta property="og:title" content="Amupedia" /> | ||||||||||||||||||||||
<meta | ||||||||||||||||||||||
property="og:description" | ||||||||||||||||||||||
content="Amupedia is an initiative to help college students pursuing B.Tech, B.E or B.Com, especially from AMU." | ||||||||||||||||||||||
/> | ||||||||||||||||||||||
<meta name="twitter:card" content="summary" /> | ||||||||||||||||||||||
<meta property="og:url" content="https://www.amupedia.com" /> | ||||||||||||||||||||||
<script | ||||||||||||||||||||||
type="application/ld+json" | ||||||||||||||||||||||
dangerouslySetInnerHTML={addProductJsonLd()} | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Avoid using dangerouslySetInnerHTML due to potential security risks. Consider using safer alternatives to inject JSON-LD structured data, such as serializing the JSON object directly into the script tag. |
||||||||||||||||||||||
key="product-jsonld" | ||||||||||||||||||||||
/> | ||||||||||||||||||||||
</Head> | ||||||||||||||||||||||
<section styles={{ position: "relative" }}> | ||||||||||||||||||||||
<Navbar /> | ||||||||||||||||||||||
<Component {...pageProps}></Component> | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. JSX elements without children should be self-closing. - <Component {...pageProps}></Component>
+ <Component {...pageProps} /> Committable suggestion
Suggested change
|
||||||||||||||||||||||
<Script | ||||||||||||||||||||||
async | ||||||||||||||||||||||
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-6172950963478417" | ||||||||||||||||||||||
crossOrigin="anonymous" | ||||||||||||||||||||||
></Script> | ||||||||||||||||||||||
Comment on lines
+135
to
+139
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. JSX elements without children should be self-closing. - <Script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-6172950963478417" crossOrigin="anonymous"></Script>
+ <Script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-6172950963478417" crossOrigin="anonymous" /> Committable suggestion
Suggested change
|
||||||||||||||||||||||
</section> | ||||||||||||||||||||||
</motion.div> | ||||||||||||||||||||||
</StoreProvider> | ||||||||||||||||||||||
); | ||||||||||||||||||||||
>>>>>>> 2e3ced3f1a6c1a70341b50aee0bde119b118a150 | ||||||||||||||||||||||
} | ||||||||||||||||||||||
|
||||||||||||||||||||||
export default MyApp; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Provide a href attribute for the link.
The anchor tag inside the
Link
component should have a meaningfulhref
attribute. Consider providing a dynamic or specific link related to the opportunity.