feat: update editor provider

This commit is contained in:
QiShaoXuan
2022-12-07 15:50:05 +08:00
parent f160b68a19
commit dec83774a1
4 changed files with 150 additions and 22 deletions
@@ -1,5 +1,5 @@
import React, { useState } from 'react';
import Router from 'next/router';
import { useRouter } from 'next/router';
import {
StyledArrowButton,
StyledListItem,
@@ -8,18 +8,31 @@ import {
StyledSubListItem,
} from './style';
import { Arrow } from './icons';
import Link from 'next/link';
export const WorkSpaceSliderBar = () => {
const [show, setShow] = useState(false);
const router = useRouter();
return (
<>
<StyledSliderBar show={show}>
<StyledListItem>Quick search</StyledListItem>
<StyledListItem
onClick={() => {
Router.push('/all-page');
router.push({
pathname: '/',
query: {
pageId: new Date().getTime().toString(),
},
});
}}
>
All pages
Back to Doc
</StyledListItem>
<StyledListItem>
<Link href={{ pathname: '/all-page', query: { name: 'test' } }}>
All pages
</Link>
</StyledListItem>
<StyledListItem>Favourites</StyledListItem>
<StyledSubListItem>