diff --git a/frontend-web/webclient/app/DefaultObjects.ts b/frontend-web/webclient/app/DefaultObjects.ts index cc2aa47c5e..f91c2d9d3e 100644 --- a/frontend-web/webclient/app/DefaultObjects.ts +++ b/frontend-web/webclient/app/DefaultObjects.ts @@ -6,8 +6,6 @@ import {SidebarStateProps} from "./Applications/Redux/Reducer"; import {getUserThemePreference} from "./UtilityFunctions"; import {defaultAvatar} from "./AvataaarLib"; import {HookStore} from "./Utilities/ReduxHooks"; -import {ProviderBrandingResponse} from "./UCloud/ProviderBrandingApi"; -import {initProviderBranding} from "./ProviderBrandings/AutomaticProviderBranding"; import {BrandingResponse} from "./UCloud/BrandingApi"; import {initBranding} from "./Applications/Branding/AutomaticBranding"; import {SidebarTabId} from "./ui-components/SidebarComponents"; @@ -27,7 +25,6 @@ export interface LegacyReduxObject { avatar: AvatarReduxObject; project: ProjectRedux.State; terminal: TerminalState; - providerBrandings: ProviderBrandingResponse; branding: BrandingResponse popinChild: PopInArgs; sidebar: SidebarStateProps; @@ -59,7 +56,6 @@ export function initObject(): ReduxObject { avatar: initAvatar(), project: ProjectRedux.initialState, terminal: initTerminalState(), - providerBrandings: initProviderBranding(), branding: initBranding(), popinChild: {el: undefined}, sidebar: {favorites: [], theme: getThemeOrDefaultValue()} diff --git a/frontend-web/webclient/app/Grants/Editor.tsx b/frontend-web/webclient/app/Grants/Editor.tsx index 0fbade9c71..242e8ad39a 100644 --- a/frontend-web/webclient/app/Grants/Editor.tsx +++ b/frontend-web/webclient/app/Grants/Editor.tsx @@ -41,8 +41,8 @@ import {useLocation, useNavigate} from "react-router-dom"; import * as Grants from "."; import {State} from "."; import {ChangeOrganizationDetails, OptionalInfo, optionalInfoRequest, optionalInfoUpdate} from "@/UserSettings/ChangeUserDetails"; -import {useSelector} from "react-redux"; import {sendFailureNotification, sendSuccessNotification} from "@/Notifications"; +import {providerBrandingStore} from "@/ProviderBrandings/AutomaticProviderBranding"; // State model // ===================================================================================================================== @@ -166,25 +166,25 @@ const defaultState: EditorState = { type EditorAction = | {type: "GrantLoaded", grant: Grants.Application, wallets: Accounting.WalletV2[]} | { - type: "GrantGiverInitiatedLoaded", - wallets: Accounting.WalletV2[], - start: number, - end: number, - title: string, - projectId?: string, - piUsernameHint: string -} + type: "GrantGiverInitiatedLoaded", + wallets: Accounting.WalletV2[], + start: number, + end: number, + title: string, + projectId?: string, + piUsernameHint: string + } | {type: "AllocatorsLoaded", allocators: Grants.GrantGiver[], recipientType?: Grants.Recipient["type"]} | {type: "DurationUpdated", month?: number, year?: number, duration?: number} | {type: "DurationWarning", durationWarning: string} | {type: "AllocatorChecked", isChecked: boolean, allocatorId: string} | { - type: "BalanceUpdated", - provider: string, - category: string, - allocator: string, - balance: number | null, -} + type: "BalanceUpdated", + provider: string, + category: string, + allocator: string, + balance: number | null, + } | {type: "SetIsCreating", stateDuringCreate?: EditorState["stateDuringCreate"]} | {type: "RecipientUpdated", isCreatingNewProject: boolean, reference?: string} | {type: "ProjectsReloaded", projects: {id: string | null, title: string}[]} @@ -1438,7 +1438,6 @@ export function Editor(): React.ReactNode { const isForSubAllocator = getQueryParam(location.search, "subAllocator") == "true"; useProjectId(); // FIXME(Jonas): Is this some refresh-thing that breaks stuff if you remove it? - const providerBrandingData = useSelector((it: ReduxObject) => it.providerBrandings); const [missingUserInfo, setMissingUserInfo] = React.useState(false); React.useEffect(() => { (async () => { @@ -1937,8 +1936,8 @@ export function Editor(): React.ReactNode { state.fullScreenLoading ? <> : state.fullScreenError ? <> - {state.fullScreenError} - : + {state.fullScreenError} + :

Information about your project

@@ -1962,8 +1961,8 @@ export function Editor(): React.ReactNode { {!state.locked && <> {!isGrantGiverInitiated && + color={"errorMain"} + onAction={onDiscard} /> }