Skip to content

Commit

Permalink
delete files
Browse files Browse the repository at this point in the history
  • Loading branch information
abvthecity committed Feb 6, 2025
1 parent 2488ea9 commit 1f8509a
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 410 deletions.
11 changes: 3 additions & 8 deletions packages/fern-docs/bundle/src/components/atoms/playground.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
import { Dispatch, SetStateAction, useEffect } from "react";
import { useCallbackOne } from "use-memo-one";
import { selectHref } from "../hooks/useHref";
import { usePreloadApiLeaf } from "../playground/hooks/usePreloadApiLeaf";
import {
PLAYGROUND_AUTH_STATE_BASIC_AUTH_INITIAL,
PLAYGROUND_AUTH_STATE_BEARER_TOKEN_INITIAL,
Expand Down Expand Up @@ -438,8 +437,6 @@ export const HAS_API_PLAYGROUND = atom(
export function useOpenPlayground(): (
node?: FernNavigation.NavigationNodeApiLeaf
) => Promise<void> {
const preload = usePreloadApiLeaf();

return useAtomCallback(
useCallbackOne(
async (get, set, node?: FernNavigation.NavigationNodeApiLeaf) => {
Expand Down Expand Up @@ -478,8 +475,6 @@ export function useOpenPlayground(): (
const formStateAtom = playgroundFormStateFamily(node.id);
set(PLAYGROUND_NODE_ID, node.id);

const definition = await preload(node);

const formState = get(formStateAtom);
if (formState != null) {
playgroundFormStateFamily.remove(node.id);
Expand All @@ -490,7 +485,7 @@ export function useOpenPlayground(): (
get(FERN_USER_ATOM)?.playground?.initial_state;

if (node.type === "endpoint") {
const context = createEndpointContext(node, definition);
const context = createEndpointContext(node, undefined);

if (context == null) {
// TODO: sentry
Expand All @@ -513,7 +508,7 @@ export function useOpenPlayground(): (
)
);
} else if (node.type === "webSocket") {
const context = createWebSocketContext(node, definition);
const context = createWebSocketContext(node, undefined);

if (context == null) {
// TODO: sentry
Expand All @@ -532,7 +527,7 @@ export function useOpenPlayground(): (
}
playgroundFormStateFamily.remove(node.id);
},
[preload]
[]
)
);
}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { ReactElement, forwardRef } from "react";
import { useMemoOne } from "use-memo-one";
import { getApiDefinitionAtom } from "../../atoms";
import { Markdown } from "../../mdx/Markdown";
import { usePreloadApiLeaf } from "../hooks/usePreloadApiLeaf";

interface PlaygroundEndpointSelectorLeafNodeProps {
node: FernNavigation.EndpointNode | FernNavigation.WebSocketNode;
Expand All @@ -21,7 +20,6 @@ export const PlaygroundEndpointSelectorLeafNode = forwardRef<
HTMLLIElement,
PlaygroundEndpointSelectorLeafNodeProps
>(({ node, filterValue, active, shallow }, ref) => {
const preload = usePreloadApiLeaf();
const text = renderTextWithHighlight(node.title, filterValue);

const description = useAtomValue(
Expand Down Expand Up @@ -70,7 +68,6 @@ export const PlaygroundEndpointSelectorLeafNode = forwardRef<
{node.isResponseStream ? "STREAM" : undefined}
</HttpMethodBadge>
}
onMouseEnter={() => void preload(node)}
/>
</FernTooltip>
</li>
Expand All @@ -97,7 +94,6 @@ export const PlaygroundEndpointSelectorLeafNode = forwardRef<
WSS
</HttpMethodBadge>
}
onMouseEnter={() => void preload(node)}
/>
</FernTooltip>
</li>
Expand Down

This file was deleted.

Loading

0 comments on commit 1f8509a

Please sign in to comment.