Skip to content

Commit

Permalink
fix: Console logout seems buggy (#715)
Browse files Browse the repository at this point in the history
  • Loading branch information
dogmar authored Feb 22, 2024
1 parent 85e9bb8 commit 474d6c9
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 84 deletions.
1 change: 0 additions & 1 deletion assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@
"moment": "2.29.4",
"phoenix": "1.7.3",
"pluralsh-absinthe-socket-apollo-link": "0.2.0",
"posthog-js": "1.66.1",
"query-string": "8.1.0",
"randomcolor": "0.6.2",
"react": "18.2.0",
Expand Down
3 changes: 0 additions & 3 deletions assets/src/components/contexts/DeploymentSettingsContext.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { createContext, useContext, useMemo } from 'react'
import { POLL_INTERVAL } from 'components/cd/ContinuousDeployment'
import { useCDEnabled } from 'components/cd/utils/useCDEnabled'
import {
DeploymentSettingsFragment,
useDeploymentSettingsQuery,
Expand All @@ -26,8 +25,6 @@ export function DeploymentSettingsProvider({
errorPolicy: 'all',
})

useCDEnabled({ redirect: false })

const providerValue = useMemo(
() => data?.deploymentSettings,
[data?.deploymentSettings]
Expand Down
2 changes: 0 additions & 2 deletions assets/src/components/layout/Console.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ export default function Console() {
function ConsoleContent() {
const isProduction = import.meta.env.MODE === 'production'

// usePosthogIdentify()

return (
<Flex
position="relative"
Expand Down
2 changes: 0 additions & 2 deletions assets/src/components/layout/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import {
} from 'react'
import { Avatar, Flex, Menu, MenuItem, useOutsideClick } from 'honorable'
import { wipeToken } from 'helpers/auth'
import posthog from 'posthog-js'
import { ME_Q } from 'components/graphql/users'
import { useMutation } from '@apollo/client'
import { updateCache } from 'utils/graphql'
Expand Down Expand Up @@ -237,7 +236,6 @@ export default function Sidebar() {
const handleLogout = useCallback(() => {
setIsMenuOpen(false)
wipeToken()
posthog.reset()
const w: Window = window

w.location = '/login'
Expand Down
46 changes: 0 additions & 46 deletions assets/src/components/utils/Posthog.ts

This file was deleted.

11 changes: 0 additions & 11 deletions assets/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,6 @@ import App from './App'

// import * as serviceWorker from './serviceWorker'

// posthog.init('phc_r0v4jbKz8Rr27mfqgO15AN5BMuuvnU8hCFedd6zpSDy', {
// api_host: 'https://posthog.plural.sh',
// disable_session_recording: true,
// opt_out_capturing_by_default: true,
// })

// // add `source: console` to all events
// posthog.register({
// source: 'console',
// })

const container = document.getElementById('root') as Element
const root = createRoot(container)

Expand Down
2 changes: 0 additions & 2 deletions assets/src/routes/rootRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import { OAuthCallback } from 'components/login/OauthCallback'
import { consoleRoutes } from './consoleRoutes'

function Root() {
// usePosthog()

return (
<Suspense fallback={<LoadingIndicator />}>
<Outlet />
Expand Down
17 changes: 0 additions & 17 deletions assets/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9198,7 +9198,6 @@ __metadata:
npm-run-all: 4.1.5
phoenix: 1.7.3
pluralsh-absinthe-socket-apollo-link: 0.2.0
posthog-js: 1.66.1
prettier: 3.0.3
query-string: 8.1.0
randomcolor: 0.6.2
Expand Down Expand Up @@ -11308,13 +11307,6 @@ __metadata:
languageName: node
linkType: hard

"fflate@npm:^0.4.1":
version: 0.4.8
resolution: "fflate@npm:0.4.8"
checksum: 29d8cbe44d5e7f53e7f5a160ac7f9cc025480c7b3bfd85c5f898cbe20dfa2dad4732daa534982664bf30b35896a90af44ea33ede5d94c5ffd1b8b0c0a0a56ca2
languageName: node
linkType: hard

"fflate@npm:^0.8.1":
version: 0.8.1
resolution: "fflate@npm:0.8.1"
Expand Down Expand Up @@ -15674,15 +15666,6 @@ __metadata:
languageName: node
linkType: hard

"posthog-js@npm:1.66.1":
version: 1.66.1
resolution: "posthog-js@npm:1.66.1"
dependencies:
fflate: ^0.4.1
checksum: 55c2696bd26b0d73aef45d7a08cad82a1ce7b20f79dc65cff434b3fb45f8a5fe65a0d6ad265250ff27404ae236f91181230577fc8eb56f91e8a20912cf4737c0
languageName: node
linkType: hard

"preact@npm:^10.0.0":
version: 10.17.0
resolution: "preact@npm:10.17.0"
Expand Down

0 comments on commit 474d6c9

Please sign in to comment.