Skip to content

Commit

Permalink
fix links are not crawable
Browse files Browse the repository at this point in the history
  • Loading branch information
tsubik committed Nov 17, 2024
1 parent 86654a2 commit b265af8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
6 changes: 3 additions & 3 deletions components/layout/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ const Header = ({ url }) => {
<div className="header-container">
<h1 className="header-logo">
<Link href="/" prefetch={false}>

Open Timber Portal

</Link>
{process.env.ENV === 'staging' && (
<span className="header-logo-staging">Staging</span>
Expand All @@ -47,7 +47,7 @@ const Header = ({ url }) => {
<Search theme={theme} />
</li>
<li>
<UserDropdown theme={theme} />
<UserDropdown theme={theme} className="header-nav-list-item" />
</li>
<li>
<LanguageDropdown className="header-nav-list-item" showSelectedCode />
Expand Down
9 changes: 5 additions & 4 deletions components/ui/dropdown.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState, useEffect, useRef, useCallback } from 'react';
import React, { useState, useRef } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';

Expand All @@ -14,12 +14,13 @@ const DropdownContent = (props) => {
}

const DropdownTrigger = (props) => {
const { children, className, ...dropdownTriggerProps } = props;
const { children, ...dropdownTriggerProps } = props;
const className = classNames('dropdown__trigger', props.className);

return (
<a {...dropdownTriggerProps} className={`dropdown__trigger ${className}`}>
<div role="button" {...dropdownTriggerProps} className={className}>
{children}
</a>
</div>
);
}

Expand Down
11 changes: 7 additions & 4 deletions components/ui/user-dropdown.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';

import dynamic from 'next/dynamic';

Expand All @@ -16,10 +17,12 @@ import Icon from 'components/ui/icon';

const Login = dynamic(() => import('components/ui/login'), { ssr: false });

const UserDropdown = ({ intl, user, displayIcon, theme }) => {
const UserDropdown = ({ intl, user, displayIcon, className, theme }) => {
if (!user.token) {
return (
<a
<div
className={className}
role="button"
onClick={() => {
modal.toggleModal(true, {
children: Login
Expand All @@ -28,13 +31,13 @@ const UserDropdown = ({ intl, user, displayIcon, theme }) => {
>
{displayIcon && <Icon name="icon-user" />}
<span>{intl.formatMessage({ id: 'signin' })}</span>
</a>
</div>
)
}

return (
<Dropdown
className={`c-account-dropdown ${theme}`}
className={cx('c-account-dropdown', theme, className)}
>
<DropdownTrigger>
<div className="header-nav-list-item">
Expand Down

0 comments on commit b265af8

Please sign in to comment.