-
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 all 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 | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -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 |
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.