Skip to content

Commit

Permalink
fix: tidy index.tsx and response type
Browse files Browse the repository at this point in the history
  • Loading branch information
RODO94 committed Sep 12, 2024
1 parent b885d0e commit a009d67
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 22 deletions.
2 changes: 1 addition & 1 deletion editor.planx.uk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@mui/material": "^5.15.10",
"@mui/utils": "^5.15.11",
"@opensystemslab/map": "1.0.0-alpha.3",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#306a172",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#3891420",
"@tiptap/core": "^2.4.0",
"@tiptap/extension-bold": "^2.0.3",
"@tiptap/extension-bubble-menu": "^2.1.13",
Expand Down
10 changes: 5 additions & 5 deletions editor.planx.uk/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
import Container from "@mui/material/Container";
import Typography from "@mui/material/Typography";
import {
TeamContactSettings,
TeamSettings,
} from "@opensystemslab/planx-core/types";
import { TeamSettings } from "@opensystemslab/planx-core/types";
import { FormikConfig } from "formik";
import gql from "graphql-tag";
import { useToast } from "hooks/useToast";
import { client } from "lib/graphql";
import { useStore } from "pages/FlowEditor/lib/store";
import React, { useEffect, useState } from "react";
import SettingsSection from "ui/editor/SettingsSection";
Expand All @@ -22,12 +17,6 @@ export interface FormProps {
onSuccess: () => void;
}

interface GetTeamEmailSettings {
teams: {
teamSettings: TeamContactSettings;
}[];
}

const GeneralSettings: React.FC = () => {
const [formikConfig, setFormikConfig] = useState<
FormikConfig<TeamSettings> | undefined
Expand All @@ -40,11 +29,11 @@ const GeneralSettings: React.FC = () => {
const fetchedTeamSettings = await useStore
.getState()
.fetchCurrentTeamSettings();
console.log(fetchedTeamSettings);
if (!fetchedTeamSettings.settings) throw Error("Unable to find team");

if (!fetchedTeamSettings) throw Error("Unable to find team");

setFormikConfig({
initialValues: fetchedTeamSettings.settings,
initialValues: fetchedTeamSettings,
onSubmit: () => {},
validateOnBlur: false,
validateOnChange: false,
Expand Down
2 changes: 1 addition & 1 deletion editor.planx.uk/src/pages/FlowEditor/lib/store/team.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export interface TeamStore {
initTeamStore: (slug: string) => Promise<void>;
clearTeamStore: () => void;
fetchCurrentTeam: () => Promise<Team>;
fetchCurrentTeamSettings: () => Partial<Team>;
fetchCurrentTeamSettings: () => Promise<TeamSettings>;
updateTeamTheme: (theme: Partial<TeamTheme>) => Promise<boolean>;
updateTeamSettings: (teamSettings: Partial<TeamSettings>) => Promise<boolean>;
createTeam: (newTeam: { name: string; slug: string }) => Promise<number>;
Expand Down

0 comments on commit a009d67

Please sign in to comment.