-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove preview links from cms ui (#5)
remove preview link button from cms. currently, previews are only supported with next.js but not with astro. closes #4
- Loading branch information
Showing
2 changed files
with
1 addition
and
12 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
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 |
---|---|---|
@@ -1,16 +1,6 @@ | ||
import { env } from "@/config/env.config"; | ||
|
||
export function createAssetPaths(segment: `/${string}/`) { | ||
return { | ||
directory: `./public/assets${segment}`, | ||
publicPath: `/assets${segment}`, | ||
}; | ||
} | ||
|
||
export function createPreviewUrl(previewUrl: string) { | ||
if (env.PUBLIC_KEYSTATIC_MODE === "github") { | ||
return `/api/preview/start?branch={branch}&to=${previewUrl}`; | ||
} | ||
|
||
return previewUrl; | ||
} |