+
diff --git a/src/components/characters.tsx b/src/components/characters.tsx
index 904f60e..2c45fde 100644
--- a/src/components/characters.tsx
+++ b/src/components/characters.tsx
@@ -17,7 +17,7 @@ import { useMemo, useState } from 'react'
import { TricksterCharacter } from '../lib/trickster'
import { charactersAtom, selectedCharacterAtom } from '../state/atoms'
-export const CharacterCard = ({ character }: { character: TricksterCharacter }) => {
+export const CharacterCard = ({ character, noTopBorder = false }: { character: TricksterCharacter; noTopBorder?: boolean }) => {
const [isOpen, setIsOpen] = useState(false)
const { refs, floatingStyles, context } = useFloating({
@@ -56,7 +56,7 @@ export const CharacterCard = ({ character }: { character: TricksterCharacter })
ref={refs.setReference}
{...getReferenceProps()}
className={`
- flex flex-col border border-black
+ flex flex-col ${noTopBorder ? 'border-l border-r border-b' : 'border'} border-black
hover:cursor-pointer
hover:bg-blue-100
p-2 ${character.path === selectedCharacter?.path ? `bg-blue-200 hover:bg-blue-100` : ''}`}
@@ -74,9 +74,7 @@ export const CharacterCard = ({ character }: { character: TricksterCharacter })

{
- return (
- <>
-
no characters (not logged in?)
- >
- )
-}
-
export const CharacterRoulette = () => {
const [{ data: rawCharacters }] = useAtom(charactersAtom)
@@ -136,8 +126,10 @@ export const CharacterRoulette = () => {
}),
}
}, [rawCharacters])
+
+ // Return nothing when no characters
if (!characters || characters.length === 0) {
- return
+ return null
}
const searchResults = fuse
.search(search || '!-----', {
@@ -147,7 +139,7 @@ export const CharacterRoulette = () => {
return (
-
+
)
})
diff --git a/src/components/login.tsx b/src/components/login.tsx
index f07c004..4cc57a9 100644
--- a/src/components/login.tsx
+++ b/src/components/login.tsx
@@ -7,81 +7,126 @@ import { loginStatusAtom } from '../state/atoms'
export const LoginWidget = () => {
const [username, setUsername] = useLocalStorage('input_username', '', { syncData: false })
const [password, setPassword] = useState('')
+ const [isLoading, setIsLoading] = useState(false)
const [{ data: loginState, refetch: refetchLoginState }] = useAtom(loginStatusAtom)
const [loginError, setLoginError] = useState('')
+ // Handle logged in state
if (loginState?.logged_in) {
return (
- <>
-
-
{loginState.community_name}
-
-
-
+
+
+ ●
+ {loginState.community_name}
- >
+
+
)
}
- return (
- <>
-