Skip to content

Commit

Permalink
chore: Remove redundant comments and simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
g3n35i5 committed Feb 5, 2025
1 parent 468a224 commit 3824a27
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
3 changes: 0 additions & 3 deletions src/ui/MenuBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export default function MenuBar() {
</Box>
<Box sx={{ flexGrow: 1, display: { xs: 'none', sm: 'flex' } }} />

{/* Version Dropdown Menu */}
{projectVersions && latestVersion && projectVersions && (
<Box sx={{ flexGrow: 0, display: { xs: 'flex' } }}>
<VersionDropdown
Expand All @@ -57,7 +56,6 @@ export default function MenuBar() {
/>
</Box>
)}
{/* Settings Button */}
<IconButton
data-testid={testIDs.header.settingsButton}
aria-label="Open App Settings"
Expand All @@ -66,7 +64,6 @@ export default function MenuBar() {
<SettingsOutlinedIcon />
</IconButton>
</Toolbar>
{/* Sidebar */}
<SettingsSidebar open={sidebarOpen} setOpen={setSidebarOpen} />
</AppBar>
)
Expand Down
3 changes: 1 addition & 2 deletions src/ui/routes/$projectName/$version.$.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,12 @@ function DocuIFrame({ name, version, latestVersion, splat }: DocuIFramePropsI) {
useEffect(() => {
if (iframeRef.current && loaded) {
const iframeDocument = iframeRef.current.contentDocument || iframeRef.current.contentWindow?.document
const currentOrigin = window.location.origin
if (iframeDocument) {
const anchorElements = iframeDocument.querySelectorAll('a')
anchorElements.forEach((anchor) => {
const href = anchor.getAttribute('href')
if (href) {
const result = sanitizeDocuUri(href, currentOrigin, name, version)
const result = sanitizeDocuUri(href, window.location.origin, name, version)
const params = {
projectName: result.project ?? name,
version: result.version ?? version,
Expand Down

0 comments on commit 3824a27

Please sign in to comment.