Skip to content

Commit 31274af

Browse files
committed
fix: fixed auth and other minor changes
1 parent 0217ba1 commit 31274af

8 files changed

Lines changed: 164 additions & 135 deletions

File tree

app/(landing)/about/AboutUsHero2.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,21 @@ export default function AboutUsHero() {
2323
}, []);
2424

2525
return (
26-
<div className='relative flex h-full min-h-[95vh] justify-center overflow-hidden bg-[#030303]'>
26+
<div className='relative flex min-h-[100vh] flex-col justify-between overflow-hidden bg-[#030303] sm:min-h-[95vh] sm:justify-center'>
2727
<BeamBackground />
2828
<div
2929
ref={contentRef}
30-
className='relative z-10 mx-auto w-full max-w-[550px] px-5 text-center sm:mt-10 md:px-6'
30+
className='relative z-10 mx-auto flex w-full max-w-[550px] flex-1 flex-col justify-center px-4 pt-20 pb-20 text-center sm:px-5 sm:pt-10 sm:pb-40 md:px-6'
3131
>
32-
<h1 className='mb-4 flex flex-col items-center justify-center text-center text-[30px] leading-[100%] tracking-[-1.92px] text-white sm:mb-6 sm:text-[32px] lg:text-[32px] xl:text-[48px]'>
32+
<h1 className='mb-4 flex flex-col items-center justify-center text-center text-[28px] leading-[110%] tracking-[-1.5px] text-white sm:mb-6 sm:text-[32px] sm:leading-[100%] sm:tracking-[-1.92px] lg:text-[32px] xl:text-[48px]'>
3333
<span className='w-full text-center'>Boundless is Where</span>
34-
<span className='gradient-text mx-auto font-medium sm:text-nowrap'>
34+
<span className='gradient-text mx-auto mt-1 font-medium sm:mt-0 sm:text-nowrap'>
3535
Ideas meet Opportunity
3636
</span>
3737
</h1>
3838

3939
<p
40-
className='mb-6 text-[14px] leading-[160%] sm:mb-7 sm:text-[14px] xl:text-[16px]'
40+
className='mb-6 text-[13px] leading-[165%] text-zinc-300 sm:mb-7 sm:text-[14px] sm:leading-[160%] xl:text-[16px]'
4141
style={{
4242
background: 'linear-gradient(93deg, #B5B5B5 15.93%, #FFF 97.61%)',
4343
backgroundClip: 'text',
@@ -51,41 +51,41 @@ export default function AboutUsHero() {
5151
</p>
5252

5353
<nav
54-
className='mx-auto flex max-w-[446px] flex-col items-center justify-center gap-3 sm:gap-4 md:flex-row'
54+
className='mx-auto flex w-full max-w-[446px] flex-col items-stretch justify-center gap-3 sm:gap-4 md:flex-row'
5555
aria-label='Primary actions'
5656
>
57-
<Link href='/projects' className='w-full'>
57+
<Link href='/projects' className='w-full md:w-auto md:flex-1'>
5858
<BoundlessButton
5959
variant='default'
6060
size='lg'
6161
fullWidth
6262
aria-label='Explore featured projects and campaigns'
63-
className='min-h-[44px] touch-manipulation'
63+
className='min-h-[48px] touch-manipulation sm:min-h-[44px]'
6464
>
6565
Explore Projects
6666
</BoundlessButton>
6767
</Link>
68-
<Link href='/submit' className='w-full'>
68+
<Link href='/submit' className='w-full md:w-auto md:flex-1'>
6969
<BoundlessButton
7070
variant='secondary'
7171
size='lg'
7272
fullWidth
7373
aria-label='Submit your project idea for funding'
74-
className='min-h-[44px] touch-manipulation'
74+
className='min-h-[48px] touch-manipulation sm:min-h-[44px]'
7575
>
7676
Submit Your Idea
7777
</BoundlessButton>
7878
</Link>
7979
</nav>
8080
</div>
81-
<div className='absolute right-0 bottom-0 left-0 z-0'>
82-
<div className='from-background absolute right-0 bottom-0 h-[80px] w-full bg-gradient-to-t to-transparent opacity-50 sm:h-[100px]' />
81+
<div className='relative right-0 bottom-20 left-0 z-0 mt-auto sm:absolute sm:bottom-0 sm:mt-0'>
82+
<div className='absolute right-0 bottom-0 left-0 h-[120px] w-full bg-gradient-to-t from-[#030303] to-transparent opacity-80 sm:h-[100px] sm:opacity-50' />
8383
<Image
8484
src='/about-map.svg'
8585
alt=''
8686
width={1000}
8787
height={1000}
88-
className='mx-auto h-auto w-[90vw] max-w-full object-cover sm:h-full'
88+
className='mx-auto h-auto w-full max-w-full object-cover object-bottom sm:h-full sm:w-[90vw]'
8989
priority
9090
loading='eager'
9191
aria-hidden='true'

app/(landing)/about/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ export const metadata: Metadata = generatePageMetadata('about');
1717
const AboutPage = () => {
1818
return (
1919
<section>
20-
<AboutUsHero2 />
2120
<div className='relative z-10 mx-auto max-w-[1440px] space-y-[23px] md:space-y-[80px]'>
21+
<AboutUsHero2 />
2222
<Missionpage />
2323
<AboutUsDifferent />
2424
<Timeline />

components/CookieConsent.tsx

Lines changed: 94 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { Switch } from '@/components/ui/switch';
1616
import { BoundlessButton } from '@/components/buttons/BoundlessButton';
1717
import { slideInFromBottomLeft } from '@/lib/motion';
1818
import { CookiePreferences } from '@/hooks/use-cookie-consent';
19+
import Image from 'next/image';
1920

2021
const COOKIE_CONSENT_KEY = 'cookie-consent';
2122
const COOKIE_PREFERENCES_KEY = 'cookie-preferences';
@@ -154,71 +155,85 @@ const CookieConsent: React.FC = () => {
154155
animate='visible'
155156
exit='hidden'
156157
variants={slideInFromBottomLeft}
157-
className='fixed right-4 bottom-4 left-4 z-50 mx-auto w-full max-w-md sm:right-auto sm:left-4 sm:max-w-lg'
158+
className='fixed right-0 bottom-0 left-0 z-50 mx-auto w-full max-w-md px-3 pb-3 sm:right-auto sm:bottom-4 sm:left-4 sm:max-w-lg sm:px-0 sm:pb-0'
158159
role='dialog'
159160
aria-labelledby='cookie-consent-title'
160161
aria-describedby='cookie-consent-description'
161162
>
162-
<div className='rounded-2xl border border-zinc-800 bg-zinc-900 p-4 shadow-2xl sm:p-6'>
163-
<div className='mb-4 flex items-start gap-3'>
164-
<div className='flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-zinc-800'>
165-
<Cookie className='h-5 w-5 text-white' />
166-
</div>
167-
<div className='flex-1'>
168-
<h3
169-
id='cookie-consent-title'
170-
className='mb-2 text-lg font-semibold text-white'
171-
>
172-
We use cookies to enhance your experience
173-
</h3>
174-
<p
175-
id='cookie-consent-description'
176-
className='mb-4 text-sm text-zinc-400'
177-
>
178-
We use cookies to analyze site usage and personalize
179-
content. By continuing, you agree to our use of cookies.
180-
</p>
181-
</div>
163+
<div className='relative overflow-hidden rounded-2xl border border-zinc-800 bg-zinc-900 p-4 shadow-2xl sm:rounded-2xl sm:p-6'>
164+
{/* Background Wave Image */}
165+
<div className='absolute right-0 bottom-0 h-full w-full overflow-hidden rounded-2xl opacity-5'>
166+
<Image
167+
src='/wave.svg'
168+
alt=''
169+
fill
170+
className='object-cover object-bottom-right'
171+
priority={false}
172+
/>
182173
</div>
183174

184-
<div className='flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between'>
185-
<div className='flex flex-wrap items-center gap-2'>
186-
<Link
187-
href='/privacy'
188-
className='text-primary focus:ring-primary rounded text-sm hover:underline focus:ring-2 focus:ring-offset-2 focus:ring-offset-zinc-900 focus:outline-none'
189-
>
190-
Learn More
191-
</Link>
175+
{/* Content Layer */}
176+
<div className='relative z-10'>
177+
<div className='mb-4 flex items-start gap-3'>
178+
<div className='flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-zinc-800 sm:h-10 sm:w-10'>
179+
<Cookie className='h-5 w-5 text-white' />
180+
</div>
181+
<div className='min-w-0 flex-1'>
182+
<h3
183+
id='cookie-consent-title'
184+
className='mb-2 text-base leading-tight font-semibold text-white sm:text-lg'
185+
>
186+
We use cookies to enhance your experience
187+
</h3>
188+
<p
189+
id='cookie-consent-description'
190+
className='mb-4 text-xs leading-relaxed text-zinc-400 sm:text-sm'
191+
>
192+
We use cookies to analyze site usage and personalize
193+
content. By continuing, you agree to our use of cookies.
194+
</p>
195+
</div>
192196
</div>
193197

194-
<div className='flex flex-col gap-2 sm:flex-row'>
195-
<BoundlessButton
196-
variant='outline'
197-
size='sm'
198-
onClick={handleReject}
199-
className='border-zinc-800 bg-zinc-900/50 text-white hover:bg-zinc-800 hover:text-white'
200-
aria-label='Reject all cookies'
201-
>
202-
Reject
203-
</BoundlessButton>
204-
<BoundlessButton
205-
variant='outline'
206-
size='sm'
207-
onClick={() => setShowCustomize(true)}
208-
className='border-zinc-800 bg-zinc-900/50 text-white hover:bg-zinc-800 hover:text-white'
209-
aria-label='Customize cookie preferences'
210-
>
211-
Customize
212-
</BoundlessButton>
213-
<BoundlessButton
214-
variant='default'
215-
size='sm'
216-
onClick={handleAcceptAll}
217-
className='bg-primary text-primary-foreground'
218-
aria-label='Accept all cookies'
219-
>
220-
Accept All
221-
</BoundlessButton>
198+
<div className='flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between'>
199+
<div className='flex flex-wrap items-center gap-2'>
200+
<Link
201+
href='/privacy'
202+
className='text-primary focus:ring-primary rounded text-xs hover:underline focus:ring-2 focus:ring-offset-2 focus:ring-offset-zinc-900 focus:outline-none sm:text-sm'
203+
>
204+
Learn More
205+
</Link>
206+
</div>
207+
208+
<div className='flex w-full flex-col gap-2 sm:w-auto sm:flex-row'>
209+
<BoundlessButton
210+
variant='outline'
211+
size='sm'
212+
onClick={handleReject}
213+
className='w-full border-zinc-800 bg-zinc-900/50 text-white hover:bg-zinc-800 hover:text-white sm:w-auto'
214+
aria-label='Reject all cookies'
215+
>
216+
Reject
217+
</BoundlessButton>
218+
<BoundlessButton
219+
variant='outline'
220+
size='sm'
221+
onClick={() => setShowCustomize(true)}
222+
className='w-full border-zinc-800 bg-zinc-900/50 text-white hover:bg-zinc-800 hover:text-white sm:w-auto'
223+
aria-label='Customize cookie preferences'
224+
>
225+
Customize
226+
</BoundlessButton>
227+
<BoundlessButton
228+
variant='default'
229+
size='sm'
230+
onClick={handleAcceptAll}
231+
className='bg-primary text-primary-foreground w-full sm:w-auto'
232+
aria-label='Accept all cookies'
233+
>
234+
Accept All
235+
</BoundlessButton>
236+
</div>
222237
</div>
223238
</div>
224239
</div>
@@ -227,30 +242,30 @@ const CookieConsent: React.FC = () => {
227242
</AnimatePresence>
228243

229244
<Dialog open={showCustomize} onOpenChange={setShowCustomize}>
230-
<DialogContent className='max-w-2xl border-zinc-800 bg-zinc-900 text-white'>
245+
<DialogContent className='max-w-2xl border-zinc-800 bg-zinc-900 text-white sm:max-w-2xl'>
231246
<DialogHeader>
232-
<DialogTitle className='text-xl text-white'>
247+
<DialogTitle className='text-lg text-white sm:text-xl'>
233248
Cookie Preferences
234249
</DialogTitle>
235-
<DialogDescription className='text-zinc-400'>
250+
<DialogDescription className='text-xs text-zinc-400 sm:text-sm'>
236251
Manage your cookie preferences. You can enable or disable
237252
different types of cookies below.
238253
</DialogDescription>
239254
</DialogHeader>
240255

241-
<div className='space-y-6 py-4'>
256+
<div className='space-y-4 py-4 sm:space-y-6'>
242257
{/* Essential Cookies */}
243-
<div className='flex items-start justify-between gap-4 rounded-lg border border-zinc-800 bg-zinc-900/50 p-4'>
244-
<div className='flex-1'>
245-
<div className='mb-1 flex items-center gap-2'>
246-
<h4 className='font-semibold text-white'>
258+
<div className='flex flex-col gap-3 rounded-lg border border-zinc-800 bg-zinc-900/50 p-3 sm:flex-row sm:items-start sm:justify-between sm:gap-4 sm:p-4'>
259+
<div className='min-w-0 flex-1'>
260+
<div className='mb-1 flex flex-wrap items-center gap-2'>
261+
<h4 className='text-sm font-semibold text-white sm:text-base'>
247262
Essential Cookies
248263
</h4>
249264
<span className='rounded bg-zinc-800 px-2 py-0.5 text-xs text-zinc-400'>
250265
Always Active
251266
</span>
252267
</div>
253-
<p className='text-sm text-zinc-400'>
268+
<p className='text-xs leading-relaxed text-zinc-400 sm:text-sm'>
254269
These cookies are necessary for the website to function and
255270
cannot be switched off. They are usually only set in response
256271
to actions made by you.
@@ -259,18 +274,18 @@ const CookieConsent: React.FC = () => {
259274
<Switch
260275
checked={true}
261276
disabled
262-
className='mt-1'
277+
className='shrink-0 sm:mt-1'
263278
aria-label='Essential cookies (always enabled)'
264279
/>
265280
</div>
266281

267282
{/* Analytics Cookies */}
268-
<div className='flex items-start justify-between gap-4 rounded-lg border border-zinc-800 bg-zinc-900/50 p-4'>
269-
<div className='flex-1'>
270-
<h4 className='mb-1 font-semibold text-white'>
283+
<div className='flex flex-col gap-3 rounded-lg border border-zinc-800 bg-zinc-900/50 p-3 sm:flex-row sm:items-start sm:justify-between sm:gap-4 sm:p-4'>
284+
<div className='min-w-0 flex-1'>
285+
<h4 className='mb-1 text-sm font-semibold text-white sm:text-base'>
271286
Analytics Cookies
272287
</h4>
273-
<p className='text-sm text-zinc-400'>
288+
<p className='text-xs leading-relaxed text-zinc-400 sm:text-sm'>
274289
These cookies help us understand how visitors interact with
275290
our website by collecting and reporting information
276291
anonymously.
@@ -284,18 +299,18 @@ const CookieConsent: React.FC = () => {
284299
analytics: checked,
285300
}))
286301
}
287-
className='mt-1'
302+
className='shrink-0 sm:mt-1'
288303
aria-label='Enable analytics cookies'
289304
/>
290305
</div>
291306

292307
{/* Marketing Cookies */}
293-
<div className='flex items-start justify-between gap-4 rounded-lg border border-zinc-800 bg-zinc-900/50 p-4'>
294-
<div className='flex-1'>
295-
<h4 className='mb-1 font-semibold text-white'>
308+
<div className='flex flex-col gap-3 rounded-lg border border-zinc-800 bg-zinc-900/50 p-3 sm:flex-row sm:items-start sm:justify-between sm:gap-4 sm:p-4'>
309+
<div className='min-w-0 flex-1'>
310+
<h4 className='mb-1 text-sm font-semibold text-white sm:text-base'>
296311
Marketing Cookies
297312
</h4>
298-
<p className='text-sm text-zinc-400'>
313+
<p className='text-xs leading-relaxed text-zinc-400 sm:text-sm'>
299314
These cookies may be set through our site by our advertising
300315
partners to build a profile of your interests.
301316
</p>
@@ -308,7 +323,7 @@ const CookieConsent: React.FC = () => {
308323
marketing: checked,
309324
}))
310325
}
311-
className='mt-1'
326+
className='shrink-0 sm:mt-1'
312327
aria-label='Enable marketing cookies'
313328
/>
314329
</div>
@@ -318,14 +333,14 @@ const CookieConsent: React.FC = () => {
318333
<BoundlessButton
319334
variant='outline'
320335
onClick={handleCustomizeAcceptAll}
321-
className='border-zinc-800 bg-zinc-900/50 text-white hover:bg-zinc-800 hover:text-white'
336+
className='w-full border-zinc-800 bg-zinc-900/50 text-white hover:bg-zinc-800 hover:text-white sm:w-auto'
322337
>
323338
Accept All
324339
</BoundlessButton>
325340
<BoundlessButton
326341
variant='default'
327342
onClick={handleSaveCustomPreferences}
328-
className='bg-primary text-primary-foreground'
343+
className='bg-primary text-primary-foreground w-full sm:w-auto'
329344
>
330345
Save Preferences
331346
</BoundlessButton>

components/auth/LoginWrapper.tsx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,18 @@ const LoginWrapper = ({ setLoadingState }: LoginWrapperProps) => {
3232
const [isLoading, setIsLoading] = useState(false);
3333
const [lastMethod, setLastMethod] = useState<string | null>(null);
3434

35-
const callbackUrl = searchParams.get('callbackUrl') || '/';
35+
const callbackUrl =
36+
searchParams.get('callbackUrl') || process.env.NEXT_PUBLIC_APP_URL || '/';
37+
38+
useEffect(() => {
39+
const method = authClient.getLastUsedLoginMethod();
40+
setLastMethod(method);
41+
}, []);
42+
43+
useEffect(() => {
44+
const method = authClient.getLastUsedLoginMethod();
45+
setLastMethod(method);
46+
}, []);
3647

3748
useEffect(() => {
3849
const method = authClient.getLastUsedLoginMethod();
@@ -118,7 +129,7 @@ const LoginWrapper = ({ setLoadingState }: LoginWrapperProps) => {
118129
await authClient.signIn.social(
119130
{
120131
provider: 'google',
121-
callbackURL: 'http://localhost:3000/',
132+
callbackURL: callbackUrl,
122133
},
123134
{
124135
onRequest: () => {

components/auth/SignupWrapper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const SignupWrapper = ({
2929
await authClient.signIn.social(
3030
{
3131
provider: 'google',
32-
callbackURL: 'http://localhost:3000/',
32+
callbackURL: 'http://localhost:3000',
3333
},
3434
{
3535
onRequest: () => {

0 commit comments

Comments
 (0)