mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-05 01:38:44 +00:00
log username
This commit is contained in:
1 parent
489e3aec9b
commit
3fe287a304
1 file changed
+5
@@ -48,6 +48,7 @@ import { FrontendInferenceJobType, InferenceJob } from "@storyteller/components/
|
||||
import { GetModelInferenceJobStatus, GetModelInferenceJobStatusIsOk } from "@storyteller/components/src/api/model_inference/GetModelInferenceJobStatus";
|
||||
import { VoiceConversionModelUploadJob } from "@storyteller/components/src/jobs/VoiceConversionModelUploadJob";
|
||||
import { VoiceConversionModelListItem } from "@storyteller/components/src/api/voice_conversion/ListVoiceConversionModels";
|
||||
import posthog from 'posthog-js'
|
||||
|
||||
i18n
|
||||
.use(initReactI18next) // passes i18n down to react-i18next
|
||||
@@ -257,6 +258,10 @@ class App extends React.Component<Props, State> {
|
||||
|
||||
querySession = async () => {
|
||||
const sessionWrapper = await SessionWrapper.lookupSession();
|
||||
const username = sessionWrapper.getUsername();
|
||||
if (username !== undefined) {
|
||||
posthog.identify(username, {});
|
||||
}
|
||||
this.setState({
|
||||
sessionWrapper: sessionWrapper,
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user