Compare commits

..

4 Commits

Author SHA1 Message Date
semantic-release-bot
f9ec5d32c5 chore(release): 3.1.2 [skip ci]
## [3.1.2](https://github.com/antialias/soroban-abacus-flashcards/compare/v3.1.1...v3.1.2) (2025-10-14)

### Bug Fixes

* replace last remaining isLoading with isPending in CreateRoomModal ([85d13cc](85d13cc552))
2025-10-14 01:14:40 +00:00
Thomas Hallock
85d13cc552 fix: replace last remaining isLoading with isPending in CreateRoomModal
Missed one instance in the select dropdown cursor style.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-13 20:13:44 -05:00
semantic-release-bot
ef8a29e8ef chore(release): 3.1.1 [skip ci]
## [3.1.1](https://github.com/antialias/soroban-abacus-flashcards/compare/v3.1.0...v3.1.1) (2025-10-14)

### Bug Fixes

* use useCreateRoom hook instead of nonexistent createRoom from useRoomData ([f7d63b3](f7d63b30ac))
2025-10-14 00:54:35 +00:00
Thomas Hallock
f7d63b30ac fix: use useCreateRoom hook instead of nonexistent createRoom from useRoomData
The CreateRoomModal was trying to destructure createRoom from useRoomData(),
but that hook doesn't export it. Changed to use the proper useCreateRoom() hook.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-13 19:53:39 -05:00
3 changed files with 33 additions and 25 deletions

View File

@@ -1,3 +1,17 @@
## [3.1.2](https://github.com/antialias/soroban-abacus-flashcards/compare/v3.1.1...v3.1.2) (2025-10-14)
### Bug Fixes
* replace last remaining isLoading with isPending in CreateRoomModal ([85d13cc](https://github.com/antialias/soroban-abacus-flashcards/commit/85d13cc552cfe2e825f8ea20c7db00d666599134))
## [3.1.1](https://github.com/antialias/soroban-abacus-flashcards/compare/v3.1.0...v3.1.1) (2025-10-14)
### Bug Fixes
* use useCreateRoom hook instead of nonexistent createRoom from useRoomData ([f7d63b3](https://github.com/antialias/soroban-abacus-flashcards/commit/f7d63b30ac498b63797ae8683a0beb435a1c97b3))
## [3.1.0](https://github.com/antialias/soroban-abacus-flashcards/compare/v3.0.0...v3.1.0) (2025-10-14)

View File

@@ -1,6 +1,6 @@
import { useState } from 'react'
import { Modal } from '@/components/common/Modal'
import { useRoomData } from '@/hooks/useRoomData'
import { useCreateRoom } from '@/hooks/useRoomData'
export interface CreateRoomModalProps {
/**
@@ -23,13 +23,11 @@ export interface CreateRoomModalProps {
* Modal for creating a new multiplayer room
*/
export function CreateRoomModal({ isOpen, onClose, onSuccess }: CreateRoomModalProps) {
const { createRoom } = useRoomData()
const { mutateAsync: createRoom, isPending } = useCreateRoom()
const [error, setError] = useState('')
const [isLoading, setIsLoading] = useState(false)
const handleClose = () => {
setError('')
setIsLoading(false)
onClose()
}
@@ -46,8 +44,6 @@ export function CreateRoomModal({ isOpen, onClose, onSuccess }: CreateRoomModalP
return
}
setIsLoading(true)
try {
// Create the room (creator is auto-added as first member)
await createRoom({
@@ -62,8 +58,6 @@ export function CreateRoomModal({ isOpen, onClose, onSuccess }: CreateRoomModalP
onSuccess?.()
} catch (err) {
setError(err instanceof Error ? err.message : 'Failed to create room')
} finally {
setIsLoading(false)
}
}
@@ -113,7 +107,7 @@ export function CreateRoomModal({ isOpen, onClose, onSuccess }: CreateRoomModalP
type="text"
required
placeholder="My Awesome Room"
disabled={isLoading}
disabled={isPending}
style={{
width: '100%',
padding: '12px',
@@ -148,7 +142,7 @@ export function CreateRoomModal({ isOpen, onClose, onSuccess }: CreateRoomModalP
<select
name="gameName"
required
disabled={isLoading}
disabled={isPending}
style={{
width: '100%',
padding: '12px',
@@ -158,7 +152,7 @@ export function CreateRoomModal({ isOpen, onClose, onSuccess }: CreateRoomModalP
color: 'rgba(209, 213, 219, 1)',
fontSize: '15px',
outline: 'none',
cursor: isLoading ? 'not-allowed' : 'pointer',
cursor: isPending ? 'not-allowed' : 'pointer',
}}
onFocus={(e) => {
e.currentTarget.style.borderColor = 'rgba(34, 197, 94, 0.6)'
@@ -190,7 +184,7 @@ export function CreateRoomModal({ isOpen, onClose, onSuccess }: CreateRoomModalP
<button
type="button"
onClick={handleClose}
disabled={isLoading}
disabled={isPending}
style={{
flex: 1,
padding: '12px',
@@ -200,17 +194,17 @@ export function CreateRoomModal({ isOpen, onClose, onSuccess }: CreateRoomModalP
borderRadius: '10px',
fontSize: '15px',
fontWeight: '600',
cursor: isLoading ? 'not-allowed' : 'pointer',
opacity: isLoading ? 0.5 : 1,
cursor: isPending ? 'not-allowed' : 'pointer',
opacity: isPending ? 0.5 : 1,
transition: 'all 0.2s ease',
}}
onMouseEnter={(e) => {
if (!isLoading) {
if (!isPending) {
e.currentTarget.style.background = 'rgba(75, 85, 99, 0.4)'
}
}}
onMouseLeave={(e) => {
if (!isLoading) {
if (!isPending) {
e.currentTarget.style.background = 'rgba(75, 85, 99, 0.3)'
}
}}
@@ -219,38 +213,38 @@ export function CreateRoomModal({ isOpen, onClose, onSuccess }: CreateRoomModalP
</button>
<button
type="submit"
disabled={isLoading}
disabled={isPending}
style={{
flex: 1,
padding: '12px',
background: isLoading
background: isPending
? 'rgba(75, 85, 99, 0.3)'
: 'linear-gradient(135deg, rgba(34, 197, 94, 0.8), rgba(22, 163, 74, 0.8))',
color: 'rgba(255, 255, 255, 1)',
border: isLoading
border: isPending
? '2px solid rgba(75, 85, 99, 0.5)'
: '2px solid rgba(34, 197, 94, 0.6)',
borderRadius: '10px',
fontSize: '15px',
fontWeight: '600',
cursor: isLoading ? 'not-allowed' : 'pointer',
opacity: isLoading ? 0.5 : 1,
cursor: isPending ? 'not-allowed' : 'pointer',
opacity: isPending ? 0.5 : 1,
transition: 'all 0.2s ease',
}}
onMouseEnter={(e) => {
if (!isLoading) {
if (!isPending) {
e.currentTarget.style.background =
'linear-gradient(135deg, rgba(34, 197, 94, 0.9), rgba(22, 163, 74, 0.9))'
}
}}
onMouseLeave={(e) => {
if (!isLoading) {
if (!isPending) {
e.currentTarget.style.background =
'linear-gradient(135deg, rgba(34, 197, 94, 0.8), rgba(22, 163, 74, 0.8))'
}
}}
>
{isLoading ? 'Creating...' : 'Create Room'}
{isPending ? 'Creating...' : 'Create Room'}
</button>
</div>
</form>

View File

@@ -1,6 +1,6 @@
{
"name": "soroban-monorepo",
"version": "3.1.0",
"version": "3.1.2",
"private": true,
"description": "Beautiful Soroban Flashcard Generator - Monorepo",
"workspaces": [