-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
270 additions
and
258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+689 Bytes
(100%)
frontend/__snapshots__/replay-player-failure--recent-recordings-404--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+494 Bytes
(100%)
frontend/__snapshots__/replay-player-failure--recent-recordings-404--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 0 additions & 42 deletions
42
frontend/src/queries/nodes/DataTable/ExportWithConfirmation.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import * as Sentry from '@sentry/react' | ||
import { afterMount, connect, kea, path } from 'kea' | ||
import api from 'lib/api' | ||
import { getAppContext } from 'lib/utils/getAppContext' | ||
|
||
import { UserType } from '~/types' | ||
|
||
import type { appContextLogicType } from './appContextLogicType' | ||
import { organizationLogic } from './organizationLogic' | ||
import { teamLogic } from './teamLogic' | ||
import { userLogic } from './userLogic' | ||
|
||
export const appContextLogic = kea<appContextLogicType>([ | ||
path(['scenes', 'appContextLogic']), | ||
connect({ | ||
actions: [ | ||
userLogic, | ||
['loadUserSuccess'], | ||
organizationLogic, | ||
['loadCurrentOrganizationSuccess'], | ||
teamLogic, | ||
['loadCurrentTeam', 'loadCurrentTeamSuccess'], | ||
], | ||
}), | ||
afterMount(({ actions }) => { | ||
const appContext = getAppContext() | ||
const preloadedUser = appContext?.current_user | ||
|
||
if (appContext && preloadedUser) { | ||
void api.get('api/users/@me/').then((remoteUser: UserType) => { | ||
if (remoteUser.uuid !== preloadedUser.uuid) { | ||
console.error(`Preloaded user ${preloadedUser.uuid} does not match remote user ${remoteUser.uuid}`) | ||
Sentry.captureException( | ||
new Error(`Preloaded user ${preloadedUser.uuid} does not match remote user ${remoteUser.uuid}`), | ||
{ | ||
tags: { | ||
posthog_app_context: JSON.stringify(getAppContext()), | ||
remote_user: JSON.stringify(remoteUser), | ||
}, | ||
} | ||
) | ||
|
||
// NOTE: This doesn't fix the issue but removes the confusion of seeing incorrect user info in the UI | ||
actions.loadUserSuccess(remoteUser) | ||
actions.loadCurrentOrganizationSuccess(remoteUser.organization) | ||
actions.loadCurrentTeam() | ||
} | ||
}) | ||
} | ||
}), | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.