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

Added Professor rating page, improved navbar #18

Merged
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
63 changes: 54 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"@google/generative-ai": "^0.17.1",
"@huggingface/inference": "^2.8.0",
"@huggingface/transformers": "^3.0.0-alpha.9",
"@mui/icons-material": "^5.16.7",
"@mui/material": "^5.16.7",
"@pinecone-database/pinecone": "^3.0.1",
"@radix-ui/react-avatar": "^1.1.0",
Expand All @@ -23,32 +24,33 @@
"cheerio": "^1.0.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"framer-motion": "^11.3.29",
"framer-motion": "^11.3.30",
"gemini-api": "^2.0.4",
"lucide-react": "^0.429.0",
"mini-svg-data-uri": "^1.4.4",
"next": "14.2.6",
"node-cache": "^5.1.2",
"node-fetch": "^3.3.2",
"openai": "^4.56.0",
"overlayscrollbars-react": "^0.5.6",
"pinecone-client": "^2.0.0",
"puppeteer": "^23.1.1",
"react": "^18",
"react": "^18.3.1",
"react-circular-progressbar": "^2.1.0",
"react-dom": "^18",
"react-dom": "^18.3.1",
"react-icons": "^5.3.0",
"simplex-noise": "^4.0.3",
"tailwind-merge": "^2.5.2",
"tailwindcss-animate": "^1.0.7"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/react": "^18.3.4",
"@types/react-dom": "^18.3.0",
"eslint": "^8",
"eslint-config-next": "14.2.6",
"postcss": "^8",
"tailwindcss": "^3.4.1",
"typescript": "^5"
"typescript": "^5.5.4"
}
}
10 changes: 6 additions & 4 deletions src/app/(routes)/(home)/home/page.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import React from 'react'
import { Navbar } from '@/components/Navbar'
import { Chat } from './chat'
import { Footer } from '@/components/Footer'
import { Navbar } from '@/components/Navbar'

type Props = {}

export default function Home({}: Props) {
export default function Home({ }: Props) {
return (
<><><Chat />
<><> <Navbar /></>
<Chat />
<Footer /></>
<Navbar /></>


)
}
13 changes: 13 additions & 0 deletions src/app/(routes)/faq/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

import React from 'react'
import { FAQ } from '@/components/FAQ';
import { Footer } from '@/components/Footer';

type Props = {}

export default function Home({}: Props) {
return (
<><FAQ /><Footer /></>
)
}

10 changes: 10 additions & 0 deletions src/app/(routes)/professor/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import Professor from '@/components/Professor';
import React from 'react';

export default function Page() {
return (
<div>
<Professor/>
</div>
);
}
Empty file.
108 changes: 108 additions & 0 deletions src/components/FAQ.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
'use client';

import { useState } from 'react';

export function FAQ() {
const [expanded, setExpanded] = useState(Array(10).fill(false));

const handleToggle = (index: number) => {
const newExpanded = [...expanded];
newExpanded[index] = !newExpanded[index];
setExpanded(newExpanded);
};

const faqs = [
{
question: "What is 'Rate My Workplace'?",
answer:
'"Rate My Workplace" is a platform where employees can anonymously share their experiences and rate their workplaces. The goal is to provide insights and transparency about various companies\' work environments.',
},
{
question: 'Can I submit my own review on "Rate My Workplace"?',
answer:
`"Rate My Workplace" does not accept user-submitted reviews. Instead, the platform uses AI to provide feedback based on a curated list of reviews already in our database.`,
},
{
question: 'Can I remain anonymous when submitting a review?',
answer:
'Yes, all reviews are submitted anonymously to protect your privacy. We do not collect personal information that could identify you.',
},
{
question: 'How do you ensure the authenticity of reviews?',
answer:
'We use a combination of automated and manual moderation processes to review and verify submissions. This helps ensure that the feedback we publish is authentic and valuable.',
},
{
question: 'How can I contact support if I have an issue?',
answer:
'If you have any issues or questions, please use the "Contact Us" section on the site. Fill out the contact form, and our support team will get back to you as soon as possible.',
},
{
question: 'Can I edit or delete my review after submission?',
answer:
'Once a review is submitted, it cannot be edited or deleted by the user. If you need to make changes, please contact our support team with the details of your request.',
},
{
question: 'How is the data used by the chatbot?',
answer:
'The chatbot uses semantic search embeddings to provide relevant responses based on the data stored in our database. It helps users find information quickly and accurately by understanding the context of their queries.',
},
{
question: 'What is Pinecone, and how is it used here?',
answer:
'Pinecone is a vector database used for semantic search. We use Pinecone to manage and search the embeddings of our data, allowing the chatbot to retrieve and provide precise answers based on user queries.',
},
{
question: 'Can I rate multiple workplaces?',
answer:
'Yes, you can rate multiple workplaces. Each review is considered individually and contributes to the overall rating of the respective workplace.',
},
{
question: 'How can I provide feedback about the website?',
answer:
'If you have feedback about the website, please use the "Contact Us" section to share your thoughts. We welcome suggestions and comments to help improve our platform.',
},
];

return (
<div className="bg-slate-600 text-white py-16 px-6">
<div className="max-w-4xl mx-auto">
<h2 className="text-4xl font-bold text-center mb-12">Frequently Asked Questions</h2>
<div className="space-y-4">
{faqs.map((faq, index) => (
<div
key={index}
className="bg-gray-800 p-4 rounded-lg shadow-md cursor-pointer"
onClick={() => handleToggle(index)}
>
<div className="flex justify-between items-center">
<h3 className="text-xl font-semibold">{faq.question}</h3>
<svg
className={`w-6 h-6 transform transition-transform ${
expanded[index] ? 'rotate-180' : ''
}`}
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
d="M19 9l-7 7-7-7"
/>
</svg>
</div>
{expanded[index] && (
<div className="mt-4 text-gray-400">
<p>{faq.answer}</p>
</div>
)}
</div>
))}
</div>
</div>
</div>
);
}
2 changes: 1 addition & 1 deletion src/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function Footer() {
<Link href="/about" className="text-gray-400 hover:text-white text-xs md:text-sm"> {/* Reduced font size */}
About Us
</Link>
<Link href="/professors" className="text-gray-400 hover:text-white text-xs md:text-sm"> {/* Reduced font size */}
<Link href="/professor" className="text-gray-400 hover:text-white text-xs md:text-sm"> {/* Reduced font size */}
Professors
</Link>
<Link href="/blog" className="text-gray-400 hover:text-white text-xs md:text-sm"> {/* Reduced font size */}
Expand Down
Loading