mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-18 02:26:21 +08:00
Merge branch 'feat/filesystem_and_search' of github.com:toeverything/AFFiNE into feat/filesystem_and_search
This commit is contained in:
@@ -47,6 +47,7 @@ import {
|
||||
import { Avatar } from '@mui/material';
|
||||
import { Menu, MenuItem } from '@/ui/menu';
|
||||
import { toast } from '@/ui/toast';
|
||||
import { Empty } from '@/ui/empty';
|
||||
import { useAppState } from '@/providers/app-state-provider';
|
||||
import { WorkspaceDetails } from '../workspace-slider-bar/WorkspaceSelector/SelectorPopperContent';
|
||||
import { GeneralPage } from './general';
|
||||
@@ -193,6 +194,9 @@ const MembersPage = ({ workspace }: { workspace: Workspace }) => {
|
||||
<StyledMemberRoleContainer>Access level</StyledMemberRoleContainer>
|
||||
</StyledMemberTitleContainer>
|
||||
<StyledMemberListContainer>
|
||||
{members.length === 0 && (
|
||||
<Empty width={648} sx={{ marginTop: '60px' }} height={300}></Empty>
|
||||
)}
|
||||
{members.length ? (
|
||||
members.map(member => {
|
||||
return (
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
import { useRouter } from 'next/router';
|
||||
import { useAppState } from '@/providers/app-state-provider/context';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
|
||||
export const useInitWorkspace = (disabled?: boolean) => {
|
||||
const [loading, setLoading] = useState(true);
|
||||
// Do not set as a constant, or it will trigger a hell of re-rendering
|
||||
const defaultOutLineWorkspaceId = useRef(new Date().getTime().toString());
|
||||
|
||||
const router = useRouter();
|
||||
const {
|
||||
workspacesMeta,
|
||||
@@ -14,7 +17,7 @@ export const useInitWorkspace = (disabled?: boolean) => {
|
||||
const workspaceId =
|
||||
(router.query.workspaceId as string) ||
|
||||
workspacesMeta?.[0]?.id ||
|
||||
new Date().getTime().toString();
|
||||
defaultOutLineWorkspaceId.current;
|
||||
|
||||
useEffect(() => {
|
||||
if (disabled) {
|
||||
|
||||
Reference in New Issue
Block a user