Skip to content

Commit

Permalink
update all style
Browse files Browse the repository at this point in the history
  • Loading branch information
seadfeng committed Oct 24, 2024
1 parent fe4655f commit ae7dff9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/frontend/page/style/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

import { Markdown } from "@/components/shared/markdown";
import { Textarea } from "@/components/ui/textarea";
import { alternatingFontKeys } from "@/fonts";
import { cn } from "@/lib/utils";
import { styleFonts, StyleKey } from "@/slugs";
import { fontKeys } from "@/transforms";
import { FontKey, fontKeys } from "@/transforms";
import { usePathname, useRouter } from "next/navigation";
import { useState } from "react";
import { Fonts } from "./fonts";
Expand All @@ -29,7 +30,10 @@ export function StyleMain({
router.replace(`${pathname}?text=${encodeURIComponent(e.target.value)}`);
}

const currentFonts = style === "all" ? fontKeys : styleFonts[style];
const allFonts: FontKey[] = [];
fontKeys.map(item => allFonts.push(item) )
alternatingFontKeys.map(item => allFonts.push(item) )
const currentFonts = style === "all" ? allFonts as readonly FontKey[] : styleFonts[style];

return (
<div className={cn("w-full leading-9 text-base")}>
Expand Down

0 comments on commit ae7dff9

Please sign in to comment.