diff options
| author | Maze Winther <mazewinther@gmail.com> | 2026-03-27 00:55:15 +0100 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2026-03-29 15:56:48 +0200 |
| commit | 4d127a038bf768eded68aae3cfa5c1b12241bdac (patch) | |
| tree | 16bbb801caf6770546cff4fdb37b6408ec9ead98 /apps/web/src/lib/guides/definitions/platforms.tsx | |
| parent | 82817cb50cb0487350573d6129130aec705f924b (diff) | |
| download | opencut-4d127a038bf768eded68aae3cfa5c1b12241bdac.tar.gz | |
chore: normalize line endings
Diffstat (limited to 'apps/web/src/lib/guides/definitions/platforms.tsx')
| -rw-r--r-- | apps/web/src/lib/guides/definitions/platforms.tsx | 130 |
1 files changed, 65 insertions, 65 deletions
diff --git a/apps/web/src/lib/guides/definitions/platforms.tsx b/apps/web/src/lib/guides/definitions/platforms.tsx index ffeec1c0..8c403eb1 100644 --- a/apps/web/src/lib/guides/definitions/platforms.tsx +++ b/apps/web/src/lib/guides/definitions/platforms.tsx @@ -1,65 +1,65 @@ -import Image from "next/image"; -import type { GuideDefinition } from "@/lib/guides/types"; -import { TikTokLayout } from "./tiktok-layout"; - -function PlatformLogo({ - domain, - className = "size-4", -}: { - domain: string; - className?: string; -}) { - return ( - <Image - src={`https://cdn.brandfetch.io/${domain}/w/64/h/64`} - alt="" - width={18} - height={18} - className={className} - draggable={false} - unoptimized - /> - ); -} - -function PlatformGuidePreview({ domain }: { domain: string }) { - return <PlatformLogo domain={domain} />; -} - -function platformGuide({ - id, - label, - domain, -}: { - id: string; - label: string; - domain: string; -}): GuideDefinition { - return { - id, - label, - renderPreview: () => <PlatformGuidePreview domain={domain} />, - renderTriggerIcon: () => <PlatformLogo domain={domain} />, - renderOverlay: () => null, - }; -} - -export const tiktokGuide: GuideDefinition = { - ...platformGuide({ id: "tiktok", label: "TikTok", domain: "tiktok.com" }), - renderOverlay: () => <TikTokLayout />, -}; -export const igReelsGuide = platformGuide({ - id: "ig-reels", - label: "Reels", - domain: "instagram.com", -}); -export const ytShortsGuide = platformGuide({ - id: "yt-shorts", - label: "Shorts", - domain: "youtube.com", -}); -export const spotlightGuide = platformGuide({ - id: "spotlight", - label: "Spotlight", - domain: "snapchat.com", -}); +import Image from "next/image";
+import type { GuideDefinition } from "@/lib/guides/types";
+import { TikTokLayout } from "./tiktok-layout";
+
+function PlatformLogo({
+ domain,
+ className = "size-4",
+}: {
+ domain: string;
+ className?: string;
+}) {
+ return (
+ <Image
+ src={`https://cdn.brandfetch.io/${domain}/w/64/h/64`}
+ alt=""
+ width={18}
+ height={18}
+ className={className}
+ draggable={false}
+ unoptimized
+ />
+ );
+}
+
+function PlatformGuidePreview({ domain }: { domain: string }) {
+ return <PlatformLogo domain={domain} />;
+}
+
+function platformGuide({
+ id,
+ label,
+ domain,
+}: {
+ id: string;
+ label: string;
+ domain: string;
+}): GuideDefinition {
+ return {
+ id,
+ label,
+ renderPreview: () => <PlatformGuidePreview domain={domain} />,
+ renderTriggerIcon: () => <PlatformLogo domain={domain} />,
+ renderOverlay: () => null,
+ };
+}
+
+export const tiktokGuide: GuideDefinition = {
+ ...platformGuide({ id: "tiktok", label: "TikTok", domain: "tiktok.com" }),
+ renderOverlay: () => <TikTokLayout />,
+};
+export const igReelsGuide = platformGuide({
+ id: "ig-reels",
+ label: "Reels",
+ domain: "instagram.com",
+});
+export const ytShortsGuide = platformGuide({
+ id: "yt-shorts",
+ label: "Shorts",
+ domain: "youtube.com",
+});
+export const spotlightGuide = platformGuide({
+ id: "spotlight",
+ label: "Spotlight",
+ domain: "snapchat.com",
+});
|
