|
@@ -3,6 +3,7 @@ import React from 'react';
|
|
|
import { IUserHasId } from '@growi/core';
|
|
import { IUserHasId } from '@growi/core';
|
|
|
import { Link as ScrollLink } from 'react-scroll';
|
|
import { Link as ScrollLink } from 'react-scroll';
|
|
|
|
|
|
|
|
|
|
+import { DEFAULT_AUTO_SCROLL_OPTS } from '~/client/util/smooth-scroll';
|
|
|
import { RecentlyCreatedIcon } from '~/components/Icons/RecentlyCreatedIcon';
|
|
import { RecentlyCreatedIcon } from '~/components/Icons/RecentlyCreatedIcon';
|
|
|
|
|
|
|
|
import styles from './ContentLinkButtons.module.scss';
|
|
import styles from './ContentLinkButtons.module.scss';
|
|
@@ -12,7 +13,7 @@ const OFFSET = -120;
|
|
|
const BookMarkLinkButton = React.memo(() => {
|
|
const BookMarkLinkButton = React.memo(() => {
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
- <ScrollLink to="bookmarks-list" smooth="easeOutQuart" offset={OFFSET} duration={800}>
|
|
|
|
|
|
|
+ <ScrollLink to="bookmarks-list" offset={OFFSET} {...DEFAULT_AUTO_SCROLL_OPTS}>
|
|
|
<button
|
|
<button
|
|
|
type="button"
|
|
type="button"
|
|
|
className="btn btn-outline-secondary btn-sm px-2"
|
|
className="btn btn-outline-secondary btn-sm px-2"
|
|
@@ -29,7 +30,7 @@ BookMarkLinkButton.displayName = 'BookMarkLinkButton';
|
|
|
const RecentlyCreatedLinkButton = React.memo(() => {
|
|
const RecentlyCreatedLinkButton = React.memo(() => {
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
- <ScrollLink to="recently-created-list" smooth="easeOutQuart" offset={OFFSET} duration={800}>
|
|
|
|
|
|
|
+ <ScrollLink to="recently-created-list" offset={OFFSET} {...DEFAULT_AUTO_SCROLL_OPTS}>
|
|
|
<button
|
|
<button
|
|
|
type="button"
|
|
type="button"
|
|
|
className="btn btn-outline-secondary btn-sm px-3"
|
|
className="btn btn-outline-secondary btn-sm px-3"
|