Add activeTab to local state

This commit is contained in:
Chi Vinh Le
2018-09-13 18:29:22 +02:00
parent db483849dd
commit ecc9eadc67
23 changed files with 120 additions and 44 deletions
@@ -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 {