feat: add more entrances to activities page
This commit is contained in:
@@ -68,5 +68,6 @@
|
||||
"Tip the post: {{name}}": "赞赏文章:{{name}}",
|
||||
"Custom": "自定义",
|
||||
"Mintable": "可铸造",
|
||||
"Comming soon": "即将推出"
|
||||
"Comming soon": "即将推出",
|
||||
"Successfully followed": "嘿!你已经准备好<2>在这里跟上你关注的博主的最新动态</2>了。"
|
||||
}
|
||||
@@ -169,5 +169,11 @@
|
||||
"DNS check failed.": "DNS 检查失败。",
|
||||
"Recheck": "重新检查",
|
||||
"Latest": "最新",
|
||||
"Following": "关注"
|
||||
"Following": "关注",
|
||||
"Create a Post": "创建文章",
|
||||
"Change Site Icon or domain": "更改站点图标或域名",
|
||||
"Join xLog's Discord channel": "加入 xLog 的 Discord 频道",
|
||||
"Participate in the development of xLog": "参与 xLog 的开发",
|
||||
"Follow xLog's Twitter": "关注 xLog 的 Twitter",
|
||||
"Check out the updates of other bloggers": "查看其他博主的更新"
|
||||
}
|
||||
@@ -10,7 +10,10 @@ import {
|
||||
import { useConnectedAction } from "@crossbell/connect-kit"
|
||||
import { cn } from "~/lib/utils"
|
||||
import { Profile } from "~/lib/types"
|
||||
import { useTranslation } from "next-i18next"
|
||||
import { Trans, useTranslation } from "next-i18next"
|
||||
import { toast } from "react-hot-toast"
|
||||
import { UniLink } from "~/components/ui/UniLink"
|
||||
import { SITE_URL } from "~/lib/env"
|
||||
|
||||
export const FollowingButton: React.FC<{
|
||||
site: Profile | undefined | null
|
||||
@@ -49,6 +52,26 @@ export const FollowingButton: React.FC<{
|
||||
}
|
||||
}, [subscribeToSite])
|
||||
|
||||
useEffect(() => {
|
||||
if (subscribeToSite.isSuccess) {
|
||||
subscribeToSite.reset()
|
||||
toast.success(
|
||||
<span>
|
||||
<Trans i18nKey="Successfully followed" ns="common">
|
||||
Hey there! You're all set to{" "}
|
||||
<UniLink className="underline" href={`${SITE_URL}/activities`}>
|
||||
keep up with your followed blogger's latest buzz here
|
||||
</UniLink>
|
||||
.
|
||||
</Trans>
|
||||
</span>,
|
||||
{
|
||||
duration: 5000,
|
||||
},
|
||||
)
|
||||
}
|
||||
}, [subscribeToSite, t])
|
||||
|
||||
useEffect(() => {
|
||||
if (unsubscribeFromSite.isLoading || subscribeToSite.isLoading) {
|
||||
loadingStatusChange?.(true)
|
||||
|
||||
@@ -5,7 +5,8 @@ export const UniLink: React.FC<{
|
||||
onClick?: () => void
|
||||
children: React.ReactNode
|
||||
className?: string
|
||||
}> = ({ href, onClick, children, className, ...props }) => {
|
||||
target?: string
|
||||
}> = ({ href, onClick, children, className, target, ...props }) => {
|
||||
if (onClick) {
|
||||
return (
|
||||
<button className={className} onClick={onClick} {...props}>
|
||||
@@ -36,7 +37,7 @@ export const UniLink: React.FC<{
|
||||
}
|
||||
|
||||
return (
|
||||
<Link href={href} className={className}>
|
||||
<Link href={href} className={className} target={target}>
|
||||
{children}
|
||||
</Link>
|
||||
)
|
||||
|
||||
@@ -109,12 +109,12 @@ export default function SubdomainIndex() {
|
||||
</li>
|
||||
<li>
|
||||
<UniLink href={`/dashboard/${subdomain}/editor?type=post`}>
|
||||
Create a Post
|
||||
{t("Create a Post")}
|
||||
</UniLink>
|
||||
</li>
|
||||
<li>
|
||||
<UniLink href={`/dashboard/${subdomain}/settings/general`}>
|
||||
Change Site Name or Icon
|
||||
{t("Change Site Icon or domain")}
|
||||
</UniLink>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -132,30 +132,23 @@ export default function SubdomainIndex() {
|
||||
}}
|
||||
>
|
||||
<li>
|
||||
<UniLink href={DISCORD_LINK}>
|
||||
Join {APP_NAME}
|
||||
{`'`}s Discord channel
|
||||
<UniLink href="/activities" target="_blank">
|
||||
{t("Check out the updates of other bloggers")}
|
||||
</UniLink>
|
||||
</li>
|
||||
<li>
|
||||
<UniLink
|
||||
href={getSiteLink({
|
||||
subdomain: "xlog",
|
||||
})}
|
||||
>
|
||||
Follow {APP_NAME}
|
||||
{`'`}s xLog
|
||||
<UniLink href={DISCORD_LINK}>
|
||||
{t("Join xLog's Discord channel")}
|
||||
</UniLink>
|
||||
</li>
|
||||
<li>
|
||||
<UniLink href={GITHUB_LINK}>
|
||||
Participate in the development of xLog
|
||||
{t("Participate in the development of xLog")}
|
||||
</UniLink>
|
||||
</li>
|
||||
<li>
|
||||
<UniLink href={TWITTER_LINK}>
|
||||
Follow {APP_NAME}
|
||||
{`'`}s Twitter
|
||||
{t("Follow xLog's Twitter")}
|
||||
</UniLink>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
+1
-11
@@ -304,17 +304,7 @@ function Home() {
|
||||
variantColor="gradient"
|
||||
>
|
||||
<span>
|
||||
<Link
|
||||
to={"Showcase"}
|
||||
spy={true}
|
||||
smooth={true}
|
||||
duration={500}
|
||||
onClick={() => {
|
||||
setShowcaseMore(true)
|
||||
}}
|
||||
>
|
||||
{t("Look at others'")}
|
||||
</Link>
|
||||
<UniLink href="/activities">{t("Look at others'")}</UniLink>
|
||||
</span>
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user