Skip to content

Commit

Permalink
Merge pull request #292 from DAOmasons/rtEditorFix
Browse files Browse the repository at this point in the history
Rt editor fix
  • Loading branch information
jordanlesich authored Aug 8, 2024
2 parents ef8e853 + a68a736 commit 8034177
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 18 deletions.
6 changes: 3 additions & 3 deletions src/.graphclient/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10253,7 +10253,7 @@ export type GetProjectsQuery = { Project: Array<(
)> };

export type GetUserProjectsQueryVariables = Exact<{
id: Scalars['String'];
chainId: Scalars['String'];
}>;


Expand Down Expand Up @@ -10889,10 +10889,10 @@ export const GetProjectsDocument = gql`
${ProjectDetailsFragmentDoc}
${RawMetadataFragmentDoc}` as unknown as DocumentNode<GetProjectsQuery, GetProjectsQueryVariables>;
export const GetUserProjectsDocument = gql`
query GetUserProjects($id: String!) {
query GetUserProjects($chainId: String!) {
Project(
order_by: {db_write_timestamp: desc, hasEditedProfile: desc_nulls_last}
where: {owner: {_eq: $id}}
where: {owner: {_eq: $chainId}}
) {
...ProjectDetails
metadata {
Expand Down
7 changes: 4 additions & 3 deletions src/components/RTEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ export const RTEditor = ({

return (
<RichTextEditor
ref={editorContainerRef}
editor={editor}
h={editorHeight}
mih={editorHeight}
ref={editorContainerRef}
bg={'transparent'}
classNames={{ root: classes.editor }}
>
Expand Down Expand Up @@ -65,7 +65,8 @@ export const RTEditor = ({
p="lg"
fz="md"
bg={'transparent'}
mih={editorHeight}
// mih={editorHeight}
// h="100%"
onClick={handleContentEditorFocus}
/>
</RichTextEditor>
Expand Down
2 changes: 1 addition & 1 deletion src/components/feed/RichTextUpdate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const RichTextUpdate = () => {
isLoading,
error,
} = useQuery({
queryKey: ['post', id],
queryKey: ['post', id, chainId],
queryFn: () => getRTUpdate(id as string, chainId),
enabled: !!id,
});
Expand Down
2 changes: 1 addition & 1 deletion src/components/grant/AllocationComplete.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { formatEther } from 'viem';
import { useGrant } from '../../hooks/useGrant';
import { InsetUpdate } from './InsetUpdate';
import { IconLock, IconShieldHalf } from '@tabler/icons-react';
import { IconShieldHalf } from '@tabler/icons-react';
import { Text } from '@mantine/core';
import { Bold } from '../Typography';
import { GAME_TOKEN } from '../../constants/gameSetup';
Expand Down
4 changes: 2 additions & 2 deletions src/components/grant/GrantCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const GrantStatusIndicator = ({
if (status === GrantStatus.ApplicationSubmitted) {
return (
<StatusIndicator
text="Application Started"
text="Application Submitted"
icon={<IconFileDescription size={16} />}
/>
);
Expand All @@ -122,7 +122,7 @@ const GrantStatusIndicator = ({
if (status === GrantStatus.ApplicationApproved) {
return (
<StatusIndicator
text="Application Not Approved"
text="Application Approved"
icon={<IconFileCheck size={16} />}
/>
);
Expand Down
2 changes: 0 additions & 2 deletions src/components/grant/MilestonesDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ export const MilestonesDrawer = ({
});
};

console.log('formData', formData);

const handlePostMilestones = async () => {
setIsLoading(true);

Expand Down
2 changes: 1 addition & 1 deletion src/contexts/GlobalState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const GlobalStateProvider = ({
error: userStateError,
refetch: refetchUserState,
} = useQuery({
queryKey: [`user-state-${address}`],
queryKey: [`user-state-${address}`, chainId],
queryFn: () => getUserData(address as string, chainId),
enabled: !!address,
});
Expand Down
4 changes: 2 additions & 2 deletions src/graphql/newQueries/getProjects.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ query GetProjects($chainId: Int!) {
}
}

query GetUserProjects($id: String!) {
query GetUserProjects($chainId: String!) {
Project(
order_by: { db_write_timestamp: desc, hasEditedProfile: desc_nulls_last }
where: { owner: { _eq: $id } }
where: { owner: { _eq: $chainId } }
) {
...ProjectDetails
metadata {
Expand Down
1 change: 0 additions & 1 deletion src/pages/MyProjects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ const getUserProjects = async (projects: ProjectCardFromQuery[]) => {
};

export const MyProjects = () => {
const chainId = useChainId();
const { id } = useParams();
const theme = useMantineTheme();

Expand Down
2 changes: 1 addition & 1 deletion src/pages/Projects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const Projects = () => {
const chainId = useChainId();

const { data, isLoading, error } = useQuery({
queryKey: ['projects'],
queryKey: ['projects', chainId],
queryFn: () => getProjectCards({ chainId }),
enabled: !!chainId,
});
Expand Down
1 change: 0 additions & 1 deletion src/queries/getProjectCards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ const projectMetadataResolver = async (project: ProjectCardFromQuery) => {
export const getProjectCards = async ({ chainId }: { chainId: number }) => {
try {
const { GetProjects } = getBuiltGraphSDK();

const result = await GetProjects({ chainId });

const filteredProjects = result.Project?.filter(
Expand Down

0 comments on commit 8034177

Please sign in to comment.