V2 onboarding (#2543)
* fix cannot query avatarUrl * create workspace working * fix bugs related to refetch queries * onboarding working * updated dependency array * improve error handling * update types, remove as any, remove console logs * small fix
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import styled from '@emotion/styled';
|
||||
|
||||
import { ColorScheme } from '~/generated/graphql';
|
||||
import { ColorScheme } from '@/workspace-member/types/WorkspaceMember';
|
||||
|
||||
import { ColorSchemeCard } from './ColorSchemeCard';
|
||||
|
||||
@ -37,25 +37,25 @@ export const ColorSchemePicker = ({
|
||||
<StyledContainer>
|
||||
<StyledCardContainer>
|
||||
<ColorSchemeCard
|
||||
onClick={() => onChange(ColorScheme.Light)}
|
||||
onClick={() => onChange('Light')}
|
||||
variant="light"
|
||||
selected={value === ColorScheme.Light}
|
||||
selected={value === 'Light'}
|
||||
/>
|
||||
<StyledLabel>Light</StyledLabel>
|
||||
</StyledCardContainer>
|
||||
<StyledCardContainer>
|
||||
<ColorSchemeCard
|
||||
onClick={() => onChange(ColorScheme.Dark)}
|
||||
onClick={() => onChange('Dark')}
|
||||
variant="dark"
|
||||
selected={value === ColorScheme.Dark}
|
||||
selected={value === 'Dark'}
|
||||
/>
|
||||
<StyledLabel>Dark</StyledLabel>
|
||||
</StyledCardContainer>
|
||||
<StyledCardContainer>
|
||||
<ColorSchemeCard
|
||||
onClick={() => onChange(ColorScheme.System)}
|
||||
onClick={() => onChange('System')}
|
||||
variant="system"
|
||||
selected={value === ColorScheme.System}
|
||||
selected={value === 'System'}
|
||||
/>
|
||||
<StyledLabel>System settings</StyledLabel>
|
||||
</StyledCardContainer>
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
import styled from '@emotion/styled';
|
||||
import { useRecoilValue } from 'recoil';
|
||||
|
||||
import { currentUserState } from '@/auth/states/currentUserState';
|
||||
import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';
|
||||
import { getImageAbsoluteURIOrBase64 } from '@/users/utils/getProfilePictureAbsoluteURI';
|
||||
|
||||
@ -53,7 +52,6 @@ type NavWorkspaceButtonProps = {
|
||||
const NavWorkspaceButton = ({
|
||||
showCollapseButton,
|
||||
}: NavWorkspaceButtonProps) => {
|
||||
const currentUser = useRecoilValue(currentUserState);
|
||||
const currentWorkspace = useRecoilValue(currentWorkspaceState);
|
||||
|
||||
const DEFAULT_LOGO =
|
||||
|
||||
@ -3,13 +3,11 @@ import styled from '@emotion/styled';
|
||||
import { useRecoilValue } from 'recoil';
|
||||
|
||||
import { currentUserState } from '@/auth/states/currentUserState';
|
||||
import {
|
||||
CurrentWorkspaceMember,
|
||||
currentWorkspaceMemberState,
|
||||
} from '@/auth/states/currentWorkspaceMemberState';
|
||||
import { currentWorkspaceMemberState } from '@/auth/states/currentWorkspaceMemberState';
|
||||
import { supportChatState } from '@/client-config/states/supportChatState';
|
||||
import { IconHelpCircle } from '@/ui/display/icon';
|
||||
import { Button } from '@/ui/input/button/components/Button';
|
||||
import { WorkspaceMember } from '@/workspace-member/types/WorkspaceMember';
|
||||
import { User } from '~/generated/graphql';
|
||||
|
||||
const StyledButtonContainer = styled.div`
|
||||
@ -42,10 +40,7 @@ const SupportChat = () => {
|
||||
(
|
||||
chatId: string,
|
||||
currentUser: Pick<User, 'email' | 'supportUserHash'>,
|
||||
currentWorkspaceMember: Pick<
|
||||
CurrentWorkspaceMember,
|
||||
'firstName' | 'lastName'
|
||||
>,
|
||||
currentWorkspaceMember: Pick<WorkspaceMember, 'firstName' | 'lastName'>,
|
||||
) => {
|
||||
const url = 'https://chat-assets.frontapp.com/v1/chat.bundle.js';
|
||||
const script = document.querySelector(`script[src="${url}"]`);
|
||||
|
||||
@ -82,8 +82,6 @@ type RecordTableProps = {
|
||||
export const RecordTable = ({ updateEntityMutation }: RecordTableProps) => {
|
||||
const tableBodyRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
console.log('record table');
|
||||
|
||||
const {
|
||||
leaveTableFocus,
|
||||
setRowSelectedState,
|
||||
|
||||
@ -3,7 +3,7 @@ import { useRecoilState } from 'recoil';
|
||||
|
||||
import { currentWorkspaceMemberState } from '@/auth/states/currentWorkspaceMemberState';
|
||||
import { useUpdateOneObjectRecord } from '@/object-record/hooks/useUpdateOneObjectRecord';
|
||||
import { ColorScheme } from '~/generated/graphql';
|
||||
import { ColorScheme } from '@/workspace-member/types/WorkspaceMember';
|
||||
|
||||
export const useColorScheme = () => {
|
||||
const [currentWorkspaceMember] = useRecoilState(currentWorkspaceMemberState);
|
||||
@ -12,7 +12,7 @@ export const useColorScheme = () => {
|
||||
useUpdateOneObjectRecord({
|
||||
objectNamePlural: 'workspaceMembersV2',
|
||||
});
|
||||
const colorScheme = currentWorkspaceMember?.colorScheme ?? ColorScheme.System;
|
||||
const colorScheme = currentWorkspaceMember?.colorScheme ?? 'System';
|
||||
|
||||
const setColorScheme = useCallback(
|
||||
async (value: ColorScheme) => {
|
||||
|
||||
Reference in New Issue
Block a user