Refactor some code to make it looks cleaner

This commit is contained in:
PrinOrange
2023-12-29 19:55:54 +08:00
parent 643d528816
commit aa94563763
22 changed files with 87 additions and 106 deletions

View File

@@ -1,5 +1,5 @@
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog";
import { RSSFeedLink } from "@/consts/consts";
import { CopyrightAnnouncement, RSSFeedURL } from "@/consts/consts";
import { Config } from "@/data/config";
import Link from "next/link";
import { useState } from "react";
@@ -37,9 +37,7 @@ export const Footer = () => {
</DialogTrigger>
)}
</div>
<div className="mx-auto px-3 text-center font-bold">{`COPYRIGHT © ${
Config.YearStart
}-${new Date().getFullYear()} ${Config.AuthorName} ALL RIGHTS RESERVED`}</div>
<div className="mx-auto px-3 text-center font-bold">{CopyrightAnnouncement}</div>
<DialogContent className="sm:max-w-md">
<DialogHeader>
<DialogTitle className="flex">
@@ -57,12 +55,12 @@ export const Footer = () => {
</div>
<Separator />
<div className="w-full flex my-3">
<Input defaultValue={RSSFeedLink} readOnly />
<Input defaultValue={RSSFeedURL} readOnly />
<CopyToClipboard
onCopy={() => {
setIsCopied(true);
}}
text={RSSFeedLink}
text={RSSFeedURL}
>
<Button
type="submit"