1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-09 23:45:21 +02:00

Update Maybe card URL

Fixes #74
This commit is contained in:
Josh Pigford 2024-01-15 11:51:50 -06:00
parent e0b6d2c05c
commit 5227e3c83d
5 changed files with 21 additions and 22 deletions

View file

@ -18,7 +18,6 @@ export default function Meta() {
property="og:description" property="og:description"
content="Maybe is modern financial & investment planning" content="Maybe is modern financial & investment planning"
/> />
<meta property="og:image" content="https://assets.maybe.co/images/maybe-meta.png" />
{/* <!-- Twitter --> */} {/* <!-- Twitter --> */}
<meta property="twitter:card" content="summary_large_image" /> <meta property="twitter:card" content="summary_large_image" />
@ -28,10 +27,6 @@ export default function Meta() {
property="twitter:description" property="twitter:description"
content="Maybe is modern financial & investment planning" content="Maybe is modern financial & investment planning"
/> />
<meta
property="twitter:image"
content="https://assets.maybe.co/images/maybe-meta.png"
/>
{/* <!-- Favicons - https://realfavicongenerator.net/favicon_checker#.YUNEifxKhhE --> */} {/* <!-- Favicons - https://realfavicongenerator.net/favicon_checker#.YUNEifxKhhE --> */}
<link rel="manifest" href="/assets/site.webmanifest" /> <link rel="manifest" href="/assets/site.webmanifest" />

View file

@ -14,6 +14,10 @@ const now = DateTime.now()
export default async function handler(req: NextRequest) { export default async function handler(req: NextRequest) {
const fontData = await font const fontData = await font
const { headers } = req
const protocol = headers.get('x-forwarded-proto') || 'http'
const host = headers.get('host')
const baseUrl = `${protocol}://${host}`
try { try {
const { searchParams } = new URL(req.url) const { searchParams } = new URL(req.url)
@ -49,7 +53,7 @@ export default async function handler(req: NextRequest) {
> >
<img <img
alt="" alt=""
src="https://assets.maybe.co/images/maybe-card.png" src={`${baseUrl}/assets/maybe-card.png`}
style={{ position: 'absolute', width: '100%' }} style={{ position: 'absolute', width: '100%' }}
/> />
<div <div

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

View file

@ -53,7 +53,7 @@ export function Welcome({ title: stepTitle, onNext }: StepProps) {
await onNext() await onNext()
})} })}
> >
<div className="grow max-w-md"> <div className="max-w-md grow">
<img src="/assets/maybe.svg" className="h-8" alt="Maybe" /> <img src="/assets/maybe.svg" className="h-8" alt="Maybe" />
<h3 className="mt-14">{stepTitle}</h3> <h3 className="mt-14">{stepTitle}</h3>
<p className="mt-2 text-base text-gray-50"> <p className="mt-2 text-base text-gray-50">
@ -63,15 +63,15 @@ export function Welcome({ title: stepTitle, onNext }: StepProps) {
<Button type="submit" className="mt-14" disabled={!isValid}> <Button type="submit" className="mt-14" disabled={!isValid}>
Start exploring Start exploring
{isSubmitting ? ( {isSubmitting ? (
<LoadingIcon className="ml-2 w-5 h-5 animate-spin" /> <LoadingIcon className="w-5 h-5 ml-2 animate-spin" />
) : ( ) : (
<RiArrowRightLine className="ml-2 w-5 h-5" /> <RiArrowRightLine className="w-5 h-5 ml-2" />
)} )}
</Button> </Button>
</div> </div>
<div className="relative shrink-0"> <div className="relative shrink-0">
<fieldset className="flex items-center justify-center rounded-3xl border border-dashed border-gray-400"> <fieldset className="flex items-center justify-center border border-gray-400 border-dashed rounded-3xl">
<legend className="mx-auto px-7 text-sm text-gray-100"> <legend className="mx-auto text-sm text-gray-100 px-7">
Your Maybe card Your Maybe card
</legend> </legend>
<MaybeCard <MaybeCard
@ -86,7 +86,7 @@ export function Welcome({ title: stepTitle, onNext }: StepProps) {
card={{ details: data }} card={{ details: data }}
/> />
</fieldset> </fieldset>
<div className="mt-6 w-full flex justify-center gap-3"> <div className="flex justify-center w-full gap-3 mt-6">
<Tooltip content="Share" placement="bottom"> <Tooltip content="Share" placement="bottom">
<div className="w-full"> <div className="w-full">
<Button <Button
@ -115,7 +115,7 @@ export function Welcome({ title: stepTitle, onNext }: StepProps) {
!data && 'opacity-50 pointer-events-none' !data && 'opacity-50 pointer-events-none'
)} )}
href={data?.imageUrl} href={data?.imageUrl}
download="maybe-card.png" download="/assets/maybe-card.png"
> >
<RiDownloadLine className="w-5 h-5 text-gray-50" /> <RiDownloadLine className="w-5 h-5 text-gray-50" />
</Button> </Button>

View file

@ -40,7 +40,7 @@ export function UserDetails() {
} }
return ( return (
<div className="mt-6 space-y-10 max-w-lg"> <div className="max-w-lg mt-6 space-y-10">
<section> <section>
<h4 className="text-lg uppercase">Profile</h4> <h4 className="text-lg uppercase">Profile</h4>
<LoadingPlaceholder isLoading={profileQuery.isLoading}> <LoadingPlaceholder isLoading={profileQuery.isLoading}>
@ -64,7 +64,7 @@ export function UserDetails() {
<h4 className="text-lg uppercase">Account</h4> <h4 className="text-lg uppercase">Account</h4>
<LoadingPlaceholder isLoading={profileQuery.isLoading}> <LoadingPlaceholder isLoading={profileQuery.isLoading}>
<div className="text-base"> <div className="text-base">
<p className="text-gray-50 mb-2">Email address</p> <p className="mb-2 text-gray-50">Email address</p>
<form> <form>
<Input <Input
readOnly readOnly
@ -83,7 +83,7 @@ export function UserDetails() {
<section> <section>
<h4 className="text-lg uppercase">Danger Zone</h4> <h4 className="text-lg uppercase">Danger Zone</h4>
<p className="text-base text-gray-100 mb-4"> <p className="mb-4 text-base text-gray-100">
Deleting your account is a permanent action. If you delete your account, you Deleting your account is a permanent action. If you delete your account, you
will no longer be able to sign and all data will be deleted. will no longer be able to sign and all data will be deleted.
</p> </p>
@ -189,8 +189,8 @@ function MaybeCardSection() {
className="mt-5 text-base" className="mt-5 text-base"
onSubmit={handleSubmit((data) => updateProfile.mutate(data))} onSubmit={handleSubmit((data) => updateProfile.mutate(data))}
> >
<p className="text-gray-50 mb-2">Maybe Card</p> <p className="mb-2 text-gray-50">Maybe Card</p>
<div className="rounded-lg overflow-hidden"> <div className="overflow-hidden rounded-lg">
<MaybeCard variant="settings" flipped={isCardFlipped} details={data} /> <MaybeCard variant="settings" flipped={isCardFlipped} details={data} />
<MaybeCardShareModal <MaybeCardShareModal
isOpen={isShareModalOpen} isOpen={isShareModalOpen}
@ -199,7 +199,7 @@ function MaybeCardSection() {
card={{ details: data }} card={{ details: data }}
/> />
</div> </div>
<div className="mt-6 w-full flex justify-center gap-3"> <div className="flex justify-center w-full gap-3 mt-6">
<Tooltip content="Share" placement="bottom"> <Tooltip content="Share" placement="bottom">
<div className="w-full"> <div className="w-full">
<Button <Button
@ -226,7 +226,7 @@ function MaybeCardSection() {
variant="secondary" variant="secondary"
className={classNames(!data && 'opacity-50 pointer-events-none')} className={classNames(!data && 'opacity-50 pointer-events-none')}
href={data?.imageUrl} href={data?.imageUrl}
download="maybe-card.png" download="/assets/maybe-card.png"
> >
<RiDownloadLine className="w-5 h-5 text-gray-50" /> <RiDownloadLine className="w-5 h-5 text-gray-50" />
</Button> </Button>
@ -264,12 +264,12 @@ function MaybeCardSection() {
<div className="relative mt-6"> <div className="relative mt-6">
<label> <label>
<span className="block mb-1 text-base text-gray-50 font-light leading-6"> <span className="block mb-1 text-base font-light leading-6 text-gray-50">
Your Maybe Your Maybe
</span> </span>
<textarea <textarea
rows={5} rows={5}
className="block w-full bg-gray-500 text-base placeholder:text-gray-100 rounded border-0 focus:ring-0 resize-none" className="block w-full text-base bg-gray-500 border-0 rounded resize-none placeholder:text-gray-100 focus:ring-0"
placeholder="What's your Maybe?" placeholder="What's your Maybe?"
{...register('maybe', { required: true })} {...register('maybe', { required: true })}
onKeyDown={(e) => e.key === 'Enter' && e.stopPropagation()} onKeyDown={(e) => e.key === 'Enter' && e.stopPropagation()}