Compare commits

..

2 Commits

Author SHA1 Message Date
c03df8920c Merge pull request 'Update dependency zod to v3.25.46' (#263) from renovate/zod-3.x-lockfile into main
All checks were successful
Playwright Tests / test (push) Has been skipped
Check usage of free licenses / build-static-assets (push) Successful in 37s
Build Nginx-based docker image / build-static-assets (push) Successful in 7m29s
Reviewed-on: #263
2025-06-02 06:27:11 +00:00
Renovate Bot
d6a9415cd9 Update dependency zod to v3.25.46
All checks were successful
Playwright Tests / test (pull_request) Has been skipped
Check usage of free licenses / build-static-assets (pull_request) Successful in 2m10s
Add copyright notice / copyright_notice (pull_request) Successful in 3m3s
Build Nginx-based docker image / build-static-assets (push) Successful in 37m24s
2025-06-02 02:04:13 +00:00
2 changed files with 6 additions and 16 deletions

View File

@ -5,9 +5,8 @@
import { AbstractApi } from "@/app/api/abstract-api"; import { AbstractApi } from "@/app/api/abstract-api";
import { Guest } from "@/app/lib/guest"; import { Guest } from "@/app/lib/guest";
import { Invitation, InvitationSerializer } from "@/app/lib/invitation"; import { Invitation, InvitationSerializer } from "@/app/lib/invitation";
import { getSlug } from "@/app/lib/utils";
import { draggable, dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter'; import { draggable, dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
import { LinkIcon, TrashIcon } from "@heroicons/react/24/outline"; import { TrashIcon } from "@heroicons/react/24/outline";
import { useEffect, useRef } from "react"; import { useEffect, useRef } from "react";
import { useState } from "react"; import { useState } from "react";
@ -25,8 +24,6 @@ function InvitationCard({ invitation, allGuests, onGuestAdded, onDestroy }: {
const api = new AbstractApi<Invitation>(); const api = new AbstractApi<Invitation>();
const serializer = new InvitationSerializer(); const serializer = new InvitationSerializer();
const iconClassName = "w-5 h-5 text-white absolute top-2 opacity-0 group-hover:opacity-100 cursor-pointer";
useEffect(() => { useEffect(() => {
if (ref.current) { if (ref.current) {
return dropTargetForElements({ return dropTargetForElements({
@ -56,14 +53,8 @@ function InvitationCard({ invitation, allGuests, onGuestAdded, onDestroy }: {
className="relative flex items-center justify-center w-full bg-green-800 border border-green-900 group" className="relative flex items-center justify-center w-full bg-green-800 border border-green-900 group"
style={{ aspectRatio: "1.618 / 1" }} style={{ aspectRatio: "1.618 / 1" }}
> >
<LinkIcon
className={`${iconClassName} right-8`}
onClick={() => {
navigator.clipboard.writeText(`https://${window.location.host}/${getSlug()}/invitations/${invitation.id}`);
}}
/>
<TrashIcon <TrashIcon
className={`${iconClassName} right-2`} className="w-5 h-5 text-white absolute top-2 right-2 opacity-0 group-hover:opacity-100 cursor-pointer"
onClick={() => { onClick={() => {
if (window.confirm("Are you sure you want to delete this invitation?")) { if (window.confirm("Are you sure you want to delete this invitation?")) {
api.destroy(serializer, invitation, () => { api.destroy(serializer, invitation, () => {
@ -73,7 +64,6 @@ function InvitationCard({ invitation, allGuests, onGuestAdded, onDestroy }: {
}} }}
/> />
{guests.length === 0 ? ( {guests.length === 0 ? (
<p className="text-center text-yellow-500 text-lg italic"> <p className="text-center text-yellow-500 text-lg italic">
(empty invitation) (empty invitation)

8
pnpm-lock.yaml generated
View File

@ -61,7 +61,7 @@ importers:
version: 11.1.0 version: 11.1.0
zod: zod:
specifier: ^3.23.8 specifier: ^3.23.8
version: 3.25.45 version: 3.25.46
devDependencies: devDependencies:
'@playwright/test': '@playwright/test':
specifier: ^1.46.0 specifier: ^1.46.0
@ -1417,8 +1417,8 @@ packages:
engines: {node: '>= 14'} engines: {node: '>= 14'}
hasBin: true hasBin: true
zod@3.25.45: zod@3.25.46:
resolution: {integrity: sha512-kv1swJBZqv98NQibL0oVvkQE8rXT+6qGNM1FpZkFcJG2jnz4vbtu48bgaitp85CaBPLSKXibrEsU7MzJoVoZAA==} resolution: {integrity: sha512-IqRxcHEIjqLd4LNS/zKffB3Jzg3NwqJxQQ0Ns7pdrvgGkwQsEBdEQcOHaBVqvvZArShRzI39+aMST3FBGmTrLQ==}
snapshots: snapshots:
@ -2765,4 +2765,4 @@ snapshots:
yaml@2.4.3: {} yaml@2.4.3: {}
zod@3.25.45: {} zod@3.25.46: {}