diff options
| author | 2023-11-03 21:13:33 +0800 | |
|---|---|---|
| committer | 2023-11-03 21:13:33 +0800 | |
| commit | 9f0d43fe099a95ab1516ae951dcb60a89e76a5a5 (patch) | |
| tree | 51614fe47bff8bb11028a07d4a35c34c9ff6594a /docs/components/clients/Logo.tsx | |
| parent | 8f135707d069c900e055dae71e69909d6b9a41bb (diff) | |
| download | HydroRoll-9f0d43fe099a95ab1516ae951dcb60a89e76a5a5.tar.gz HydroRoll-9f0d43fe099a95ab1516ae951dcb60a89e76a5a5.zip | |
chore: delete useless codes
Diffstat (limited to 'docs/components/clients/Logo.tsx')
| -rw-r--r-- | docs/components/clients/Logo.tsx | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/docs/components/clients/Logo.tsx b/docs/components/clients/Logo.tsx deleted file mode 100644 index 79ab9c2..0000000 --- a/docs/components/clients/Logo.tsx +++ /dev/null @@ -1,67 +0,0 @@ -import React from "react"; -import cn from "classnames"; -import Image from "next/image"; -import { TurboUser } from "./users"; - -const DEFAULT_SIZE = { - width: 100, - height: 75, -}; - -export function Logo({ - user, - theme, - isLink, -}: { - user: TurboUser; - theme: "dark" | "light"; - isLink: boolean; -}) { - const styles = { - ...DEFAULT_SIZE, - ...user.style, - }; - let numericWidth: number; - let numericHeight: number; - if (typeof styles.width === "number") { - numericWidth = styles.width; - } - if (typeof styles.height === "number") { - numericHeight = styles.height; - } - const logo = ( - <Image - src={user.image.replace( - "/logos", - theme === "light" ? "/logos/white" : "/logos/color" - )} - alt={`${user.caption}'s Logo`} - width={numericWidth} - height={numericHeight} - priority={true} - style={styles} - className={cn("mx-8", { - "hidden dark:inline": theme !== "dark", - "dark:hidden inline": theme === "dark", - })} - /> - ); - - if (isLink) { - return ( - <a - href={user.infoLink} - target="_blank" - rel="noopener noreferrer" - className={cn("flex justify-center item-center", { - "hidden dark:flex": theme !== "dark", - "dark:hidden flex": theme === "dark", - })} - > - {logo} - </a> - ); - } - - return logo; -} |
