Skip to content

Commit

Permalink
feat: claim location
Browse files Browse the repository at this point in the history
  • Loading branch information
Nevo David committed Nov 5, 2023
1 parent 2d48d83 commit 0472b55
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 7 deletions.
13 changes: 12 additions & 1 deletion src/components/pages/claim-success/hero/hero.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,18 @@ const description = (
<>
Awesome! We will send you the swag as soon as possible.
<br />
If you have made any mistake, please contact{' '}
<div className="mb-12">To check that your submission is valid</div>
<a
target="_blank"
rel="noopener"
className="text-xl text-yellow underline hover:font-bold"
href="https://airtable.com/embed/appExUbLiOTHavFIY/shr3DV1b1xJdCUoM9?backgroundColor=red&viewControls=on"
>
Please click here
</a>
<br />
<br />
<div className="mt-10">If you have made any mistake, please contact </div>
<a className="font-medium" href="mailto:[email protected]">
[email protected]
</a>
Expand Down
27 changes: 23 additions & 4 deletions src/components/pages/claim/hero/form.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,21 @@ const Form = ({ info }) => {
return (
<>
<div>
<h1 className="font-bold">Some rules to follow before adding your information:</h1>
<ul className="mb-10 list-disc pl-10">
<li className="my-2">
If you are sending the swag to a friend or family, make sure you add them in the details
</li>
<li className="my-2">
We can't change the address location once it has shipped. Make sure you have access
to this place to take the swag
</li>
<li className="my-2">
If you are a minor, check if you can receive the package in your country. If not, add
your parents' details and location.
</li>
<li className="my-2">Please think good about your Swag size before submitting</li>
</ul>
Select Prizes to claim:
{info.map((winner) => (
<div className="mt-2 flex">
Expand All @@ -30,8 +45,12 @@ const Form = ({ info }) => {
<div className="ml-2">
{winner.type === 'COMPETITION' && 'Competition Winner'}
{winner.type === 'NOVU' && 'Novu Swag Claim'}
{winner.type === 'EXTRA' && 'Giveaway or other'} - Expires on{' '}
{moment.utc(winner.lastDateClaim).local().format('DD/MM/YYYY HH:mm')}
{(winner.type === 'EXTRA' ||
winner.type === 'EXTRA2' ||
winner.type === 'EXTRA3' ||
winner.type === 'EXTRA4') &&
'Giveaway or other'}{' '}
- Expires on {moment.utc(winner.lastDateClaim).local().format('DD/MM/YYYY HH:mm')}
</div>
</div>
))}
Expand Down Expand Up @@ -94,8 +113,8 @@ const Form = ({ info }) => {
</Select>
<Input extra={{ required: true }} label="State" type="text" name="shipping_state" />
<Input extra={{ required: true, minLength: 3 }} label="ZIP" type="text" name="shipping_zip" />
<Select label="Shirt Size" name="shirt_size">
<option value="">-- Choose Shirt Size --</option>
<Select label="Swag Size" name="shirt_size">
<option value="">-- Choose Swag Size --</option>
<option value="Small">Small</option>
<option value="Medium">Medium</option>
<option value="Large">Large</option>
Expand Down
3 changes: 1 addition & 2 deletions src/components/pages/claim/hero/hero.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { toast } from 'react-toastify';

import Hero2 from 'components/pages/no-win/hero';

import Novu from '../../../shared/socials/novu';
// import Novu from '../../../shared/socials/novu';

import Form from './form';
import NoLogged from './no-logged';
Expand Down Expand Up @@ -63,7 +63,6 @@ const Hero = ({ info }) => {
onSubmit={all.handleSubmit(onSubmit)}
>
<div className="container relative z-10 flex h-full flex-col items-center justify-center pt-10">
<Novu />
<h1 className="leading-tight mt-10 font-mono text-xl font-bold uppercase lg:text-[50px] md:text-[40px] xs:text-[32px]">
{title}
</h1>
Expand Down

1 comment on commit 0472b55

@vercel
Copy link

@vercel vercel bot commented on 0472b55 Nov 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.