mirror of
https://github.com/wassname/talk.git
synced 2026-08-05 13:30:26 +08:00
Add activeTab to local state
This commit is contained in:
@@ -18,7 +18,8 @@ exports[`init local state 1`] = `
|
||||
},
|
||||
\\"authPopup\\": {
|
||||
\\"__ref\\": \\"client:root.local.authPopup\\"
|
||||
}
|
||||
},
|
||||
\\"activeTab\\": \\"COMMENTS\\"
|
||||
},
|
||||
\\"client:root.local.network\\": {
|
||||
\\"__id\\": \\"client:root.local.network\\",
|
||||
|
||||
@@ -75,5 +75,8 @@ export default async function initLocalState(
|
||||
authPopupRecord.setValue(false, "focus");
|
||||
authPopupRecord.setValue("", "href");
|
||||
localRecord.setLinkedRecord(authPopupRecord, "authPopup");
|
||||
|
||||
// Set active tab
|
||||
localRecord.setValue("COMMENTS", "activeTab");
|
||||
});
|
||||
}
|
||||
|
||||
@@ -9,6 +9,10 @@ enum View {
|
||||
FORGOT_PASSWORD
|
||||
}
|
||||
|
||||
enum Tab {
|
||||
COMMENTS
|
||||
}
|
||||
|
||||
type AuthPopup {
|
||||
open: Boolean!
|
||||
focus: Boolean!
|
||||
@@ -26,6 +30,7 @@ type Local {
|
||||
commentID: String
|
||||
authPopup: AuthPopup!
|
||||
authToken: String
|
||||
activeTab: Tab!
|
||||
}
|
||||
|
||||
extend type Query {
|
||||
|
||||
Reference in New Issue
Block a user