''
This commit is contained in:
@@ -4,6 +4,7 @@ import { useState } from "react";
|
||||
import { Link, useTranslation } from "@/i18n/navigation";
|
||||
import { TOPIC_IDS } from "@/config";
|
||||
import type { ResourceData } from "@/app/lib/theme-data";
|
||||
import { useCrossSiteUrls } from "@/app/lib/useCrossSiteUrls";
|
||||
import ResourceNavigation from "./ResourceNavigation";
|
||||
|
||||
const mainModuleKeys = ["destinations", "vipEntry", "appDownload"] as const;
|
||||
@@ -18,11 +19,6 @@ const linkIcons: Record<string, string> = {
|
||||
cloudPhone: "☁️",
|
||||
unmannedLive: "📺",
|
||||
};
|
||||
const linkHrefs: Record<string, { href: string; newTab?: boolean }> = {
|
||||
destinations: { href: "https://meetup.hackrobot.cn/", newTab: true },
|
||||
vipEntry: { href: "https://vip.hackrobot.cn/", newTab: true },
|
||||
appDownload: { href: "/app" },
|
||||
};
|
||||
|
||||
type CommunityProps = {
|
||||
resourceData?: ResourceData;
|
||||
@@ -31,6 +27,12 @@ type CommunityProps = {
|
||||
export default function Community({ resourceData }: CommunityProps) {
|
||||
const { t } = useTranslation("community");
|
||||
const [toast, setToast] = useState(false);
|
||||
const { meetupUrl, vipUrl } = useCrossSiteUrls();
|
||||
const linkHrefs: Record<string, { href: string; newTab?: boolean }> = {
|
||||
destinations: { href: meetupUrl, newTab: true },
|
||||
vipEntry: { href: vipUrl, newTab: true },
|
||||
appDownload: { href: "/app" },
|
||||
};
|
||||
|
||||
const showUpdating = () => {
|
||||
setToast(true);
|
||||
|
||||
Reference in New Issue
Block a user