diff --git a/src/app/(posts)/components/file-dropdown/dropdown.module.css b/src/app/(posts)/components/file-dropdown/dropdown.module.css index 0e97d811..11ed4ee1 100644 --- a/src/app/(posts)/components/file-dropdown/dropdown.module.css +++ b/src/app/(posts)/components/file-dropdown/dropdown.module.css @@ -14,7 +14,6 @@ .contentWrapper { z-index: 1000; - } .content { @@ -42,9 +41,7 @@ justify-content: space-between; color: var(--dark-gray); text-decoration: none; - /* vertical alignment */ padding: var(--gap-quarter) 0; - } .content li .fileIcon { @@ -53,7 +50,6 @@ } .content li .fileTitle { - /* from Geist */ font-size: calc(0.875 * 16px); } diff --git a/src/app/(posts)/components/tabs/index.tsx b/src/app/(posts)/components/tabs/index.tsx index 53cea7db..449c1925 100644 --- a/src/app/(posts)/components/tabs/index.tsx +++ b/src/app/(posts)/components/tabs/index.tsx @@ -42,16 +42,23 @@ export default function DocumentTabs({ className={styles.root} defaultValue={defaultTab} > - - - {isEditing ? "Edit" : "Raw"} - - - {isEditing ? "Preview" : "Rendered"} - + +
+ + {isEditing ? "Edit" : "Raw"} + + + {isEditing ? "Preview" : "Rendered"} + +
+ {isEditing && ( + + )}
- {isEditing && }
+ className?: string }) => { const formattingActions = useMemo(() => { const handleBoldClick = () => textareaRef?.current?.trigger("bold") @@ -62,22 +65,28 @@ const FormattingIcons = ({ }, [textareaRef]) return ( -
- - {formattingActions.map(({ icon, name, action }) => ( - -
) } diff --git a/src/app/(posts)/post/[id]/components/post-files/view-document/index.tsx b/src/app/(posts)/post/[id]/components/post-files/view-document/index.tsx index ecb924dc..a175819a 100644 --- a/src/app/(posts)/post/[id]/components/post-files/view-document/index.tsx +++ b/src/app/(posts)/post/[id]/components/post-files/view-document/index.tsx @@ -84,7 +84,7 @@ const Document = ({ skeleton, ...props }: Props) => { // if the query has our title, we can use it to scroll to the file. // we can't use the browsers implementation because the data isn't loaded yet - if (title) { + if (title && typeof window !== "undefined") { const hash = window.location.hash if (hash && hash === `#${title}`) { const element = document.getElementById(title) diff --git a/src/app/components/button-group/button-group.module.css b/src/app/components/button-group/button-group.module.css index ee46c5b9..a6352a78 100644 --- a/src/app/components/button-group/button-group.module.css +++ b/src/app/components/button-group/button-group.module.css @@ -14,12 +14,12 @@ border-radius: 0 !important; } -.button-group > button:first-of-type { +.button-group button:first-of-type { border-top-left-radius: var(--radius) !important; border-bottom-left-radius: var(--radius) !important; } -.button-group > button:last-of-type { +.button-group button:last-of-type { border-top-right-radius: var(--radius) !important; border-bottom-right-radius: var(--radius) !important; } @@ -29,14 +29,14 @@ flex-direction: column !important; } - .verticalIfMobile.button-group > button:first-of-type { + .verticalIfMobile.button-group button:first-of-type { border-top-left-radius: var(--radius) !important; border-top-right-radius: var(--radius) !important; border-bottom-left-radius: 0 !important; border-bottom-right-radius: 0 !important; } - .verticalIfMobile.button-group > button:last-of-type { + .verticalIfMobile.button-group button:last-of-type { border-top-left-radius: 0 !important; border-top-right-radius: 0 !important; border-bottom-left-radius: var(--radius) !important;