Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions app/components/IsometricGarden.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ const IsometricGarden: React.FC = () => {
$: {
where: {
"user.id": user.id,
removedAt: { $isNull: true },
},
},
},
Expand All @@ -116,6 +117,7 @@ const IsometricGarden: React.FC = () => {
$: {
where: {
sessionId: sessionId,
removedAt: { $isNull: true },
},
},
},
Expand Down Expand Up @@ -163,9 +165,11 @@ const IsometricGarden: React.FC = () => {
where: user
? {
"user.id": user.id,
removedAt: { $isNull: true },
}
: {
sessionId: effectiveSessionId,
removedAt: { $isNull: true },
},
},
},
Expand Down Expand Up @@ -1050,11 +1054,13 @@ const IsometricGarden: React.FC = () => {
"user.id": user.id,
type: selectedInventoryBlock,
x: { $isNull: true },
removedAt: { $isNull: true },
}
: {
sessionId: effectiveSessionId,
type: selectedInventoryBlock,
x: { $isNull: true },
removedAt: { $isNull: true },
},
limit: 1,
},
Expand Down Expand Up @@ -1132,11 +1138,19 @@ const IsometricGarden: React.FC = () => {
const { data: checkData } = await db.queryOnce({
blocks: {
$: {
where: {
sessionId: effectiveSessionId,
type: selectedInventoryBlock,
x: { $isNull: true },
},
where: user
? {
"user.id": user.id,
type: selectedInventoryBlock,
x: { $isNull: true },
removedAt: { $isNull: true },
}
: {
sessionId: effectiveSessionId,
type: selectedInventoryBlock,
x: { $isNull: true },
removedAt: { $isNull: true },
},
limit: 1,
},
},
Expand Down
Loading