Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "fix(editor mode): flag to load v1 editor" #8520

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 4 additions & 30 deletions packages/app/src/app/hooks/useBetaSandboxEditor.ts
Original file line number Diff line number Diff line change
@@ -1,31 +1,5 @@
import { useAppState } from "app/overmind";
import { useGlobalPersistedState } from "./usePersistedState";

export const useBetaSandboxEditor = (): [
boolean,
React.Dispatch<React.SetStateAction<boolean>>,
() => void
] => {
const { hasLogIn } = useAppState();

const globalState = useGlobalPersistedState<boolean>(
"BETA_SANDBOX_EDITOR",
hasLogIn
);
const hasV1Override = document.location.search.includes("editorMode=v1");

if (hasV1Override) {
// @ts-ignore
return [
false,
() => {
// noop
},
() => {
// noop
},
];
}

return globalState;
// This will be removed in the first cleanup post release, but for now
// it is the simplesy way to ensure everyone is on the v2 editor
export const useBetaSandboxEditor = (): [boolean] => {
return [true];
};

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { Text, Element } from "@codesandbox/components";
import React, { FunctionComponent } from "react";
import { Text, Element } from '@codesandbox/components';
import React, { FunctionComponent } from 'react';

import { SubContainer } from "../elements";
import { BetaSandboxEditor } from "./BetaSandboxEditor";
import { SubContainer } from '../elements';

export const Experiments: FunctionComponent = () => (
<>
Expand All @@ -12,10 +11,9 @@ export const Experiments: FunctionComponent = () => (

<SubContainer>
<Element paddingTop={2}>
<BetaSandboxEditor />
{/* <Text size={13} variant="muted">
<Text size={13} variant="muted">
No experiements available at the moment
</Text> */}
</Text>
</Element>
</SubContainer>
</>
Expand Down
Loading