/* eslint-disable react-hooks/rules-of-hooks */ import { Embed } from "revolt-api/types/January"; import styles from "./Embed.module.scss"; import { useIntermediate } from "../../../../context/intermediate/Intermediate"; import { useClient } from "../../../../context/revoltjs/RevoltClient"; interface Props { embed: Embed; width?: number; height: number; } export default function EmbedMedia({ embed, width, height }: Props) { if (embed.type !== "Website") return null; const { openScreen } = useIntermediate(); const client = useClient(); switch (embed.special?.type) { case "YouTube": return (