Skip to content

Commit

Permalink
Change Themeprovider in myaccount
Browse files Browse the repository at this point in the history
  • Loading branch information
jathushan-r committed May 8, 2024
1 parent 013a62c commit 3010928
Show file tree
Hide file tree
Showing 18 changed files with 39 additions and 2,117 deletions.
5 changes: 4 additions & 1 deletion apps/myaccount/src/api/branding-preferences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
*/

import { HttpMethods } from "@wso2is/core/models";
import {
BrandingPreferenceAPIResponseInterface,
BrandingPreferenceTypes
} from "@wso2is/features/common.branding.v1/models";
import { I18nConstants } from "../constants";
import {
RequestConfigInterface,
Expand All @@ -25,7 +29,6 @@ import {
useRequest
} from "../hooks/use-request";
import { getMigratedBrandingPreference } from "../migrations/branding-preference";
import { BrandingPreferenceAPIResponseInterface, BrandingPreferenceTypes } from "../models";
import { store } from "../store";

/**
Expand Down
10 changes: 5 additions & 5 deletions apps/myaccount/src/components/shared/pre-loader/pre-loader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import Image from "@oxygen-ui/react/Image";
import { resolveAppLogoFilePath } from "@wso2is/core/helpers";
import { IdentifiableComponentInterface } from "@wso2is/core/models";
import { StringUtils } from "@wso2is/core/utils";
import { PredefinedThemes } from "@wso2is/features/common.branding.v1/models";
import { ContentLoader } from "@wso2is/react-components";
import { PredefinedThemes } from "apps/myaccount/src/models";
import React, { FunctionComponent, ReactElement } from "react";
import { Divider } from "semantic-ui-react";
import { useGetBrandingPreference } from "../../../api";
Expand All @@ -47,8 +47,8 @@ export const PreLoader: FunctionComponent<PreLoaderPropsInterface> = (
const {
["data-componentid"]: componentId
} = props;
const {

const {
data: brandingPreference,
isLoading: isBrandingLoading,
error: brandingError
Expand Down Expand Up @@ -95,7 +95,7 @@ export const PreLoader: FunctionComponent<PreLoaderPropsInterface> = (
<path
id="_2"
data-name="2"
d={ "M705.95,422.391l6.227-10.751h13.736l-6.867-11.907,6.193-10.752,19"
d={ "M705.95,422.391l6.227-10.751h13.736l-6.867-11.907,6.193-10.752,19"
+ ".321,33.411Z" }
transform="translate(-280.983 -82.98)"
fill="#ff7300"/>
Expand All @@ -114,7 +114,7 @@ export const PreLoader: FunctionComponent<PreLoaderPropsInterface> = (
!isBrandingLoading && (!brandingError || brandingError?.response?.status === 404) ? (
<Image
className="pre-loader-logo"
src={
src={
brandingPreference?.preference?.theme[
brandingPreference?.preference?.theme?.activeTheme
]?.images?.myAccountLogo?.imgURL ?? getDefaultLogo()
Expand Down
41 changes: 0 additions & 41 deletions apps/myaccount/src/contexts/branding-preference-context.tsx

This file was deleted.

19 changes: 0 additions & 19 deletions apps/myaccount/src/contexts/index.ts

This file was deleted.

Loading

0 comments on commit 3010928

Please sign in to comment.