Feat/land page (#391)

* feat: update landing page

* feat: update landing page

* fix: react warning

* feat(route): rename variables

* feat(route): better refresh

* fix: update logo and i18n

* feat(code): remove unused comment

* refactor(workspace): rename workspaceId

* refactor(page): rename pageId

* feat(edit): more robust editing experience

* fix: landing page mobile

* fix: landing page mobile

Co-authored-by: tzhangchi <terry.zhangchi@outlook.com>
Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
This commit is contained in:
zuomeng wang
2022-09-09 10:56:10 +08:00
committed by GitHub
parent bd2668335c
commit b35c9b2c14
35 changed files with 374 additions and 145 deletions
@@ -1,6 +1,6 @@
import { useState, useCallback } from 'react';
import { useParams } from 'react-router-dom';
import { services } from '@toeverything/datasource/db-service';
import { useCallback, useState } from 'react';
import { useParams } from 'react-router-dom';
import { WithEditorSelectionType } from '../menu/inline-menu/types';
export const useAddComment = ({
@@ -8,7 +8,7 @@ export const useAddComment = ({
selectionInfo,
setShow,
}: WithEditorSelectionType) => {
const { workspace_id: workspaceId, page_id: pageId } = useParams();
const { workspaceId, pageId } = useParams();
const [currentComment, setCurrentComment] = useState('');
const createComment = useCallback(async (): Promise<{
@@ -44,7 +44,7 @@ export const DoubleLinkMenu = ({
hooks,
style,
}: DoubleLinkMenuProps) => {
const { page_id: curPageId } = useParams();
const { pageId: curPageId } = useParams();
const [isOpen, setIsOpen] = useState(false);
const [anchorEl, setAnchorEl] = useState(null);
const dialogRef = useRef<HTMLDivElement>();
@@ -42,7 +42,7 @@ const normalizeUrl = (url: string) => {
};
export const LinkMenu = ({ editor, hooks }: LinkMenuProps) => {
const { page_id: curPageId } = useParams();
const { pageId: curPageId } = useParams();
const [isOpen, setIsOpen] = useState(false);
const [anchorEl, setAnchorEl] = useState(null);
const dialogRef = useRef<HTMLDivElement>();
@@ -47,7 +47,7 @@ type SearchProps = {
};
export const Search = (props: SearchProps) => {
const { workspace_id: workspaceId } = useParams();
const { workspaceId } = useParams();
const navigate = useNavigate();
const [open, setOpen] = useState(false);