Skip to content

Commit

Permalink
Bump
Browse files Browse the repository at this point in the history
  • Loading branch information
lucemans committed Jan 27, 2024
1 parent e3aa141 commit fcfc2bf
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export async function generateMetadata({
}) {
const raw_name = slug;
const name = ens_normalize(raw_name.toLowerCase());
const theme_color = theme2Color[event] || '#fff';
const theme_color = theme2Color[event] || '#F6F6F6';

if (raw_name.toLowerCase() !== name) {
throw new Error('Invalid ENS name');
Expand Down
1 change: 1 addition & 0 deletions components/POAPModal/POAPModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ export const POAPModal: FC<{
event_name={event_name}
address={mintToProfile}
iykData={data}
event_slug={event}
onCallChange={() => {
setMintToProfile('');
// eslint-disable-next-line no-undef
Expand Down
15 changes: 15 additions & 0 deletions components/POAPModal/settings.tsx
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
export const SHOW_POAP_ANYWAYS = false;

export const getTextFromInfo = (
profile: string,
event_slug: string,
event: string
) => {
if (['frensday2023', 'ethdenver2024'].includes(event_slug))
return (
<span>
Mint a POAP to show you met {profile} at {event}!
</span>
);

return <span>Mint a POAP!</span>;
};
6 changes: 5 additions & 1 deletion components/POAPModal/stages/AlreadyClaimed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ export const AlreadyClaimed: FC<{ to: string }> = ({ to }) => {
<p>You should see it in your collection</p>
<a
// href={'https://collectors.poap.xyz/token/' + poap_id}
href={'https://collectors.poap.xyz/scan/' + to}
href={
'https://collectors.poap.xyz/scan/' +
to +
'?utm_source=ens-page'
}
target="_blank"
className="btn w-full p-4"
>
Expand Down
5 changes: 4 additions & 1 deletion components/POAPModal/stages/MintToProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,23 @@ import { FiCheck, FiLoader } from 'react-icons/fi';

import { mintPOAP } from '../../../hooks/mintPOAP';
import { IYKRefResponse as IYKReferenceResponse } from '../../../hooks/useIYKRef';
import { getTextFromInfo } from '../settings';

const eth_address_regex = /^0x[\dA-Fa-f]{40}$/;

export const MintToProfile: FC<{
address: string;
poap_name: string;
event_name: string;
event_slug: string;
onCallChange: () => void;
onCallClose: () => void;
iykData: IYKReferenceResponse;
onMintToProfileError: (error: unknown) => void;
}> = ({
address,
poap_name,
event_slug,
event_name,
iykData,
onCallChange,
Expand All @@ -31,7 +34,7 @@ export const MintToProfile: FC<{
return (
<div className="space-y-2 w-full">
<div className="w-full max-w-xs mx-auto">
Mint a POAP to show you met {poap_name} at {event_name}!
{getTextFromInfo(poap_name, event_slug, event_name)}
</div>
<div className="w-full">
<button
Expand Down
3 changes: 3 additions & 0 deletions components/POAPModal/stages/NameInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ export const NameInput: FC<{
<div className="grow">
<input
type="text"
name="recipient"
autoComplete="off"
autoCorrect="off"
className={clsx(
'rounded-lg h-full w-full border block px-3',
validENS ? 'border-ens-light-blue-primary' : ''
Expand Down

0 comments on commit fcfc2bf

Please sign in to comment.