refactor(characters): drive shared UI from active character
This commit is contained in:
@@ -9,7 +9,10 @@ import {
|
||||
useChatDispatch,
|
||||
useChatState,
|
||||
} from "@/stores/chat/chat-context";
|
||||
import { useActiveCharacterRoutes } from "@/providers/character-provider";
|
||||
import {
|
||||
useActiveCharacter,
|
||||
useActiveCharacterRoutes,
|
||||
} from "@/providers/character-provider";
|
||||
|
||||
import { MobileShell } from "@/app/_components/core";
|
||||
|
||||
@@ -46,6 +49,7 @@ const chatShellStyle = {
|
||||
|
||||
export function ChatScreen() {
|
||||
const router = useRouter();
|
||||
const character = useActiveCharacter();
|
||||
const characterRoutes = useActiveCharacterRoutes();
|
||||
const searchParams = useSearchParams();
|
||||
const state = useChatState();
|
||||
@@ -167,7 +171,7 @@ export function ChatScreen() {
|
||||
>
|
||||
<div className="pointer-events-none absolute inset-0 z-0">
|
||||
<Image
|
||||
src="/images/chat/bg-chatpage.png"
|
||||
src={character.assets.chatBackground}
|
||||
alt=""
|
||||
fill
|
||||
priority
|
||||
|
||||
Reference in New Issue
Block a user