mirror of
https://github.com/Buriburizaem0n/nezha-dash-v1.git
synced 2026-09-20 18:20:13 +00:00
Implement scroll position management for navigation (#73)
* feat: implement scroll position management for main page navigation * fix: import saveMainPageScrollPosition in ServerCard and ServerCardInline components * feat: save scroll position when navigating to server from DashCommand * fix: prevent restoring stale scroll positions without main page origin
This commit is contained in:
@@ -81,6 +81,9 @@ describe("nezha api fetchers", () => {
|
||||
});
|
||||
|
||||
it("refreshes the token when a logged-in browser session has cookies", async () => {
|
||||
const consoleLog = vi
|
||||
.spyOn(console, "log")
|
||||
.mockImplementation(() => undefined);
|
||||
Object.defineProperty(document, "cookie", {
|
||||
configurable: true,
|
||||
value: "nezha_token=token; nz-csrf=test-csrf-token",
|
||||
@@ -108,5 +111,6 @@ describe("nezha api fetchers", () => {
|
||||
"X-CSRF-Token": "test-csrf-token",
|
||||
},
|
||||
});
|
||||
expect(consoleLog).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user