feat(profile)!: replace sidebar and add avatar navigation
Rename the global Sidebar route, UI, assets, analytics, and payment return context to Profile. Add accessible message-avatar navigation and preserve the source character across auth and logout flows. BREAKING CHANGE: /sidebar has been removed; use /profile instead.
This commit is contained in:
@@ -22,14 +22,14 @@ vi.mock("@/stores/user/user-context", () => ({
|
||||
}));
|
||||
|
||||
describe("CoinsRulesScreen", () => {
|
||||
it("renders outside CharacterProvider and returns to global sidebar", () => {
|
||||
it("renders outside CharacterProvider and returns to global profile", () => {
|
||||
const html = renderToStaticMarkup(
|
||||
<CoinsRulesScreen returnTo="/characters/maya/chat" />,
|
||||
);
|
||||
|
||||
expect(html).toContain("Coin Usage Rules");
|
||||
expect(html).toContain(
|
||||
'href="/sidebar?returnTo=%2Fcharacters%2Fmaya%2Fchat"',
|
||||
'href="/profile?returnTo=%2Fcharacters%2Fmaya%2Fchat"',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -118,9 +118,9 @@ export function CoinsRulesScreen({ returnTo }: CoinsRulesScreenProps) {
|
||||
<main className={styles.screen}>
|
||||
<header className={styles.header}>
|
||||
<BackButton
|
||||
href={navigation.sidebarUrl}
|
||||
href={navigation.profileUrl}
|
||||
variant="soft"
|
||||
aria-label="Back to sidebar"
|
||||
aria-label="Back to profile"
|
||||
/>
|
||||
|
||||
<div className={styles.hero}>
|
||||
|
||||
Reference in New Issue
Block a user