Skip to content

Commit 0aab833

Browse files
Hope this doesnt break, Added Policy pages, and front end upgrades.
1 parent ac7b85a commit 0aab833

26 files changed

+1819
-39
lines changed

next.config.js

-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
/* eslint-disable @typescript-eslint/no-var-requires */
22
/** @type {import('next').NextConfig} */
33
const nextConfig = {
4-
// webpack: (config) => {
5-
// config.resolve.alias.canvas = false;
6-
7-
// return config;
8-
// },
94
reactStrictMode: true,
105
swcMinify: true,
116
trailingSlash: true,

package-lock.json

+105
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"@radix-ui/react-dropdown-menu": "^2.1.1",
3838
"@radix-ui/react-icons": "^1.3.0",
3939
"@radix-ui/react-label": "^2.1.0",
40+
"@radix-ui/react-select": "^2.1.1",
4041
"@radix-ui/react-slot": "^1.1.0",
4142
"@react-pdf/renderer": "^3.4.4",
4243
"@sentry/nextjs": "^8.26.0",
@@ -59,6 +60,7 @@
5960
"react-dom": "^18.3.1",
6061
"react-dropzone": "^14.2.3",
6162
"react-firebase-hooks": "^5.1.1",
63+
"react-hook-form": "^7.53.0",
6264
"react-hot-toast": "^2.4.1",
6365
"react-icons": "^5.2.1",
6466
"react-markdown": "^9.0.1",

src/actions/tokenActions.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ export async function isTokenExpiredAction(userId: string): Promise<boolean> {
2424
}
2525

2626
const currentTime = Math.floor(Date.now() / 1000); // Current time in seconds
27-
const bufferTime = 300; // 5 minutes buffer
27+
const bufferTime = currentTime + 300; // 5 minutes buffer
28+
29+
const expirationTime = decodedToken.exp;
2830

2931
// Check if the token is expired or will expire in the next 5 minutes
3032
if (decodedToken.exp <= currentTime + bufferTime) {

src/app/about/contact/page.tsx

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
import React from 'react';
2+
import Footer from '@/components/Global/Footer';
3+
4+
const ContactPage: React.FC = () => {
5+
return (
6+
<div className='flex flex-col items-center overflow-scroll overflow-x-hidden bg-gradient-to-br from-accent2/40 to-accent/40 dark:from-accent3/30 dark:to-accent4/30'>
7+
<div className='flex flex-col items-center justify-center space-y-15 p-2 lg:p-5 xl:p-12'>
8+
<div className='py-24 sm:py-32'>
9+
<div className='mx-auto max-w-4xl px-4 text-center sm:px-6'>
10+
<h2 className='text-base font-semibold leading-7 text-accent'>Contact Us</h2>
11+
<p className='mt-2 text-4xl font-bold tracking-tight text-dark-800 dark:text-light-300'>
12+
Get in Touch
13+
</p>
14+
</div>
15+
<div className='mx-auto mt-12 max-w-3xl px-4 sm:px-6'>
16+
<div className='rounded-lg bg-light-400/30 p-8 shadow-lg shadow-dark-900/30 ring-1 ring-accent2/80 drop-shadow-md dark:bg-dark-700/50 dark:ring-accent/80'>
17+
<form className='space-y-6'>
18+
<div>
19+
<label
20+
htmlFor='name'
21+
className='block text-sm font-medium text-dark-700 dark:text-light-300'
22+
>
23+
Name
24+
</label>
25+
<input
26+
type='text'
27+
id='name'
28+
name='name'
29+
className='mt-1 block w-full rounded-md border-accent2 shadow-sm focus:border-accent focus:ring focus:ring-accent focus:ring-opacity-50'
30+
/>
31+
</div>
32+
<div>
33+
<label
34+
htmlFor='email'
35+
className='block text-sm font-medium text-dark-700 dark:text-light-300'
36+
>
37+
Email
38+
</label>
39+
<input
40+
type='email'
41+
id='email'
42+
name='email'
43+
className='mt-1 block w-full rounded-md border-accent2 shadow-sm focus:border-accent focus:ring focus:ring-accent focus:ring-opacity-50'
44+
/>
45+
</div>
46+
<div>
47+
<label
48+
htmlFor='message'
49+
className='block text-sm font-medium text-dark-700 dark:text-light-300'
50+
>
51+
Message
52+
</label>
53+
<textarea
54+
id='message'
55+
name='message'
56+
rows={4}
57+
className='mt-1 block w-full rounded-md border-accent2 shadow-sm focus:border-accent focus:ring focus:ring-accent focus:ring-opacity-50'
58+
/>
59+
</div>
60+
<div>
61+
<button
62+
type='submit'
63+
className='w-full rounded-md bg-accent px-4 py-2 text-white hover:bg-accent2 focus:outline-none focus:ring-2 focus:ring-accent focus:ring-opacity-50'
64+
>
65+
Send Message
66+
</button>
67+
</div>
68+
</form>
69+
</div>
70+
</div>
71+
</div>
72+
</div>
73+
<Footer />
74+
</div>
75+
);
76+
};
77+
78+
export default ContactPage;

src/app/about/cookies/page.tsx

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import React from 'react';
2+
import Footer from '@/components/Global/Footer';
3+
4+
const CookiePolicyPage: React.FC = () => {
5+
return (
6+
<div className='flex flex-col items-center overflow-scroll overflow-x-hidden bg-gradient-to-br from-accent2/40 to-accent/40 dark:from-accent3/30 dark:to-accent4/30'>
7+
<div className='flex flex-col items-center justify-center space-y-15 p-2 lg:p-5 xl:p-12'>
8+
<div className='py-24 sm:py-32'>
9+
<div className='mx-auto max-w-4xl px-4 text-center sm:px-6'>
10+
<h2 className='text-base font-semibold leading-7 text-accent'>Cookie Policy</h2>
11+
<p className='mt-2 text-4xl font-bold tracking-tight text-dark-800 dark:text-light-300'>
12+
Our Use of Cookies
13+
</p>
14+
</div>
15+
<div className='mx-auto mt-12 max-w-3xl px-4 sm:px-6'>
16+
<div className='rounded-lg bg-light-400/30 p-8 shadow-lg shadow-dark-900/30 ring-1 ring-accent2/80 drop-shadow-md dark:bg-dark-700/50 dark:ring-accent/80'>
17+
<p className='mb-4 text-dark-600 dark:text-light-400'>
18+
This Cookie Policy explains how PDF Chatter (&dquo;we&dquo;, &dquo;us&dquo;, and
19+
&dquo;our&dquo;) uses cookies and similar technologies to recognize you when you
20+
visit our website. It explains what these technologies are and why we use them, as
21+
well as your rights to control our use of them.
22+
</p>
23+
<h3 className='mb-2 text-xl font-semibold text-dark-800 dark:text-light-300'>
24+
What are cookies?
25+
</h3>
26+
<p className='mb-4 text-dark-600 dark:text-light-400'>
27+
Cookies are small data files that are placed on your computer or mobile device when
28+
you visit a website. Cookies are widely used by website owners in order to make
29+
their websites work, or to work more efficiently, as well as to provide reporting
30+
information.
31+
</p>
32+
<h3 className='mb-2 text-xl font-semibold text-dark-800 dark:text-light-300'>
33+
How do we use cookies?
34+
</h3>
35+
<p className='mb-4 text-dark-600 dark:text-light-400'>
36+
We use cookies for several reasons. Some cookies are required for technical reasons
37+
in order for our website to operate, and we refer to these as &dquo;essential&dquo;
38+
or &dquo;strictly necessary&dquo; cookies. Other cookies also enable us to track
39+
and target the interests of our users to enhance the experience on our website.
40+
Third parties serve cookies through our website for advertising, analytics and
41+
other purposes.
42+
</p>
43+
{/* Add more sections as needed */}
44+
</div>
45+
</div>
46+
</div>
47+
</div>
48+
<Footer />
49+
</div>
50+
);
51+
};
52+
53+
export default CookiePolicyPage;
+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import React from 'react';
2+
import FAQItem from '@/components/Cards/FAQCard';
3+
import faqData from '@/lib/constants/faqData.json';
4+
import Footer from '@/components/Global/Footer';
5+
6+
const FAQPage: React.FC = () => {
7+
return (
8+
<div className='flex flex-col items-center overflow-scroll overflow-x-hidden bg-gradient-to-br from-accent2/40 to-accent/40 dark:from-accent3/30 dark:to-accent4/30'>
9+
<div className='flex flex-col items-center justify-start space-y-15 p-2 lg:p-5 xl:p-12'>
10+
<div className='mx-auto max-w-4xl px-4 text-center sm:px-6'>
11+
<h2 className='text-base font-semibold leading-7 text-accent'>FAQ</h2>
12+
<p className='mt-2 text-4xl font-bold tracking-tight text-dark-800 dark:text-light-300'>
13+
Frequently Asked Questions
14+
</p>
15+
</div>
16+
<div className='mx-auto mt-12 max-w-3xl px-4 sm:px-6'>
17+
<div className='rounded-lg bg-light-400/30 p-8 shadow-lg shadow-dark-900/30 ring-1 ring-accent2/80 drop-shadow-md dark:bg-dark-700/50 dark:ring-accent/80'>
18+
{faqData.faqs.map((faq, index) => (
19+
<FAQItem key={index} question={faq.question} answer={faq.answer} />
20+
))}
21+
</div>
22+
</div>
23+
</div>
24+
<Footer />
25+
</div>
26+
);
27+
};
28+
29+
export default FAQPage;

0 commit comments

Comments
 (0)