Skip to content

Commit

Permalink
feat : added view on discover and webxr
Browse files Browse the repository at this point in the history
  • Loading branch information
surajhub255 committed Aug 30, 2024
1 parent ec272c1 commit b4084ba
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 29 deletions.
28 changes: 7 additions & 21 deletions src/app/create-brand/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,27 +43,13 @@ const formSchema = z.object({
slogan: z.string().min(2, {
message: 'Slogan name must be at least 2 characters',
}),
website: z.string().min(2, {
message: 'Website name must be at least 2 characters',
}),
twitter: z.string().min(2, {
message: 'Twitter name must be at least 2 characters',
}),
instagram: z.string().min(2, {
message: 'Instagram name must be at least 2 characters',
}),
facebook: z.string().min(2, {
message: 'Facebook name must be at least 2 characters',
}),
additional_link: z.string().min(2, {
message: 'Additional_link name must be at least 2 characters',
}),
link: z.string().min(2, {
message: 'Link name must be at least 2 characters',
}),
discord: z.string().min(2, {
message: 'Discord name must be at least 2 characters',
}),
website: z.string(),
twitter: z.string(),
instagram: z.string(),
facebook: z.string(),
additional_link: z.string(),
link: z.string(),
discord: z.string(),
description: z
.string()
.min(2, { message: 'Brand description must be at least 2 characters' })
Expand Down
23 changes: 15 additions & 8 deletions src/app/launch-congratulation/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@ export default function Congratulations() {
const searchParams = useSearchParams()

const brand_name = searchParams.get('brand_name')
const PhygitalId = localStorage.getItem('PhygitalId');
const WebxrId = localStorage.getItem('WebxrId');

return (
<Suspense>
<Navbar />
<main className='h-screen py-12 px-16 flex flex-col gap-8 text-black'>
<h1 className='text-3xl font-bold'>Congratulations</h1>
<p>You have successfully launched your phygital
and WebXR experience! </p>
<p>You have successfully launched your phygital
and WebXR experience! </p>
<Link href='/create-phygital'>
<Button className='w-fit bg-[#30D8FF] hover:text-white rounded-full text-black text-2xl'>
Launch Another Phygital
Expand All @@ -26,12 +28,17 @@ export default function Congratulations() {
Launch Another Collection
</Button>
</Link>
<Button className='w-fit bg-[#30D8FF] hover:text-white rounded-full text-black text-2xl'>
View On Discover
</Button>
<Button className='w-fit bg-[#30D8FF] hover:text-white rounded-full text-black text-2xl'>
View On WebXR
</Button>
<a href={`https://discover.myriadflow.com/nfts/${PhygitalId}`} target="_blank" rel="noopener noreferrer">
<Button className="w-fit bg-[#30D8FF] hover:text-white rounded-full text-black text-2xl">
View On Discover
</Button>
</a>

<Link href={`https://webxr.myriadflow.com/${WebxrId}`} target="_blank">
<Button className='w-fit bg-[#30D8FF] hover:text-white rounded-full text-black text-2xl'>
View On WebXR
</Button>
</Link>
</main>
</Suspense>
)
Expand Down
2 changes: 2 additions & 0 deletions src/app/review/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,8 @@ export default function Review() {
customizations: { data: editableWebxrData.customizations },
}),
});
const webxr = await webxrResponse.json();
localStorage.setItem("WebxrId", webxr.id);

if (!webxrResponse.ok) {
throw new Error('Failed to create WebXR data');
Expand Down

0 comments on commit b4084ba

Please sign in to comment.