feat: support mobile video previews
This commit is contained in:
@@ -9,6 +9,7 @@ import { RecommendedCard } from "../../components/RecommendedCard";
|
||||
import { SectionHeader } from "../../components/SectionHeader";
|
||||
import { MessageBubble } from "../../components/messageStream/MessageBubble";
|
||||
import { langQuery, useI18n } from "../../i18n";
|
||||
import { useLocalizedPath } from "../../useLocalizedPath";
|
||||
import { sourceLanguageQuery } from "../../i18nLanguages";
|
||||
import { cleanCategoryDisplayName } from "../../utils/categoryDisplay";
|
||||
import {
|
||||
@@ -42,6 +43,7 @@ function figmaCategoryRank(category: Category): number {
|
||||
|
||||
export function Home() {
|
||||
const { t, lang } = useI18n();
|
||||
const lp = useLocalizedPath();
|
||||
const { hash } = useLocation();
|
||||
const [cats, setCats] = useState<Category[]>([]);
|
||||
const [rec, setRec] = useState<PostBackedResource[]>([]);
|
||||
@@ -298,7 +300,7 @@ export function Home() {
|
||||
{page.map((c) => (
|
||||
<Link
|
||||
key={c.id}
|
||||
to={`/category/${encodeURIComponent(c.slug)}`}
|
||||
to={lp(`/category/${encodeURIComponent(c.slug)}`)}
|
||||
className="flex h-[88px] min-w-0 flex-col items-center justify-center gap-2 rounded-xl border border-[#27292E] bg-[#1D1E23] px-4 py-3 text-center outline-none transition hover:border-ark-gold/55 hover:bg-[#252630] focus-visible:ring-2 focus-visible:ring-ark-gold/80 focus-visible:ring-offset-2 focus-visible:ring-offset-ark-bg"
|
||||
>
|
||||
<CategoryIcon
|
||||
@@ -350,7 +352,7 @@ export function Home() {
|
||||
{figmaOrderedCategories.map((c, index) => (
|
||||
<Reveal key={c.id} delay={Math.min(index, 8) * 0.05}>
|
||||
<Link
|
||||
to={`/category/${encodeURIComponent(c.slug)}`}
|
||||
to={lp(`/category/${encodeURIComponent(c.slug)}`)}
|
||||
className="flex h-[88px] min-w-0 flex-col items-center justify-center gap-2 rounded-xl border border-[#27292E] bg-[#1D1E23] px-4 py-3 text-center outline-none transition hover:border-ark-gold/55 hover:bg-[#252630] focus-visible:ring-2 focus-visible:ring-ark-gold/80 focus-visible:ring-offset-2 focus-visible:ring-offset-ark-bg"
|
||||
>
|
||||
<CategoryIcon
|
||||
|
||||
Reference in New Issue
Block a user