Skip to content

Commit

Permalink
removes view page button from header
Browse files Browse the repository at this point in the history
  • Loading branch information
tsaikatie committed Aug 8, 2024
1 parent ddcf849 commit ad0bb96
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/internal/puck/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import {
AlertDialogTrigger,
} from "../ui/AlertDialog.tsx";
import { useCallback, useEffect } from "react";
import { useDocument } from "@yext/pages/util";
import { Button } from "../ui/button.tsx";
import { useEntityField } from "../../../components/EntityField.tsx";
import {
Expand All @@ -31,18 +30,13 @@ import {
} from "../ui/Tooltip.tsx";
import "../../../components/index.css";

const handleClick = (slug: string) => {
window.open(`/${slug}`, "_blank");
};

export const customHeader = (
handleClearLocalChanges: () => void,
handleHistoryChange: (histories: History[], index: number) => void,
data: Data,
handleSaveData: (data: Data) => Promise<void>,
isDevMode: boolean
) => {
const entityDocument = useDocument<any>();
const {
history: {
back,
Expand Down Expand Up @@ -87,12 +81,6 @@ export const customHeader = (
setHistoryIndex(-1);
}}
/>
<Button
variant="outline"
onClick={() => handleClick(entityDocument.slug)}
>
View Page
</Button>
{!isDevMode && (
<Button
variant="secondary"
Expand Down

0 comments on commit ad0bb96

Please sign in to comment.