Skip to content

Commit

Permalink
Merge pull request #977 from singnet/ui-fix
Browse files Browse the repository at this point in the history
Fix General account modal
  • Loading branch information
MarinaFedy authored Jan 29, 2025
2 parents 15356db + 050d570 commit af76435
Show file tree
Hide file tree
Showing 34 changed files with 402 additions and 613 deletions.
15 changes: 7 additions & 8 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,27 +62,26 @@ const App = () => {
dispatch(userActions.fetchUserDetails());
}, [dispatch]);

if (!isInitialized) {
const Loader = () => {
return (
<div className="loader-container">
<CircularProgress />
</div>
);
};

if (!isInitialized) {
return <Loader />;
}

return (
<ThemeProvider theme={theme}>
<Router location={history}>
<NavigateSetter />
<Suspense fallback={<CircularProgress />}>
<Suspense fallback={<Loader />}>
<Switch>
<Route path={`/${Routes.SIGNUP}`} Component={withRegistrationHeader(SignUp, headerData.SIGNUP)} />
<Route
replace
path={`/${Routes.LOGIN}`}
// {...this.props}
Component={withRegistrationHeader(Login, headerData.LOGIN)}
/>
<Route replace path={`/${Routes.LOGIN}`} Component={withRegistrationHeader(Login, headerData.LOGIN)} />
<Route
path={`/${Routes.FORGOT_PASSWORD}`}
// {...this.props}
Expand Down
6 changes: 4 additions & 2 deletions src/Redux/actionCreators/PaymentActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ export const initiatePayment = (paymentObj) => async (dispatch) => {
if (error.code) {
throw error;
}
window.location.replace(data.payment.payment_url);
window.open(data.payment.payment_url, "_blank");
} catch (error) {
dispatch(loaderActions.stopAppLoader());
console.error(error);
throw error;
} finally {
dispatch(loaderActions.stopAppLoader());
}
};

Expand Down
25 changes: 25 additions & 0 deletions src/assets/images/PayPal.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/components/AiMarketplace/MainSection/Filter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ const Filter = ({ listView, total_count, handleSearchChange, toggleView, current
return;
}
let filterObj = [];
let currentActiveFilterData = {};
if (value !== "default") {
filterObj = generateOrganizationsFilterObject([value]);
currentActiveFilterData = { [name]: [value] };
}
setActiveOrgItem(value);

const currentActiveFilterData = { [name]: [value] };

const latestPagination = { ...pagination, ...defaultPaginationParameters, q: pagination.q };
dispatch(serviceActions.handleFilterChange({ pagination: latestPagination, filterObj, currentActiveFilterData }));
};
Expand Down
3 changes: 3 additions & 0 deletions src/components/AiMarketplace/MainSection/Filter/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ export const useStyles = makeStyles((theme) => ({
display: "flex",
gap: 20,
justifyContent: "space-between",
"& .MuiSelect-select": {
color: theme.palette.text.primary,
},
"& svg": {
color: theme.palette.text.primary,
right: "0 !important",
Expand Down
3 changes: 1 addition & 2 deletions src/components/AiMarketplace/MainSection/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class MainSection extends Component {
};

render() {
const { classes, services, pagination, currentFilter } = this.props;
const { classes, services, pagination } = this.props;
const { listView } = this.state;
return (
<Grid container className={classes.mainSection}>
Expand All @@ -55,7 +55,6 @@ class MainSection extends Component {
handleSearchChange={this.handlePaginationChange}
toggleView={this.toggleView}
currentPagination={pagination}
currentFilter={currentFilter}
showToggler={isDesktop}
/>
</Grid>
Expand Down
1 change: 1 addition & 0 deletions src/components/HOC/WithInAppHeader/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const useStyles = makeStyles((theme) => ({
top: 110,
},
componentHolder: {
position: "relative",
minHeight: "calc(100vh - 70px - 250px)",
},
}));
8 changes: 4 additions & 4 deletions src/components/Onboarding/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ const Onboarding = ({ classes }) => {
const isTermsAccepted = useSelector((state) => state.userReducer.isTermsAccepted);
const nickname = useSelector((state) => state.userReducer.nickname);

const [activeSection, setActiveSection] = useState(1);
const [activeSection, setActiveSection] = useState(0);
const progressText = [{ label: "Authentication" }, { label: "Terms of service" }];

const initialChecks = () => {
if (!isEmailVerified) {
return;
}
if (activeSection === 1) {
setActiveSection(2);
if (activeSection === 0) {
setActiveSection(1);
}
if (isTermsAccepted) {
if (location?.state && location?.state?.sourcePath) {
Expand Down Expand Up @@ -76,7 +76,7 @@ const Onboarding = ({ classes }) => {
key={item.title}
classes={classes}
item={item}
active={activeSection === index + 1}
active={activeSection === index}
activeSection={activeSection}
progressText={progressText}
/>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const NextAction = (props) => {
return (
<StyledButton
type="blue"
btnText="continue"
btnText="Run service"
disabled={channel.balanceInAgi <= 0 || anyPendingTxn}
onClick={handleContinue}
/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import React from "react";
import Typography from "@mui/material/Typography";

const AGITokens = ({ amount }) => {
if (!amount || isNaN(amount)) {
return <Typography variant="body2">Enter an amount to view equivalent AGIX Tokens</Typography>;
return <span>Enter an amount to view equivalent AGIX Tokens</span>;
}
return <Typography variant="body2">{amount} AGIX Tokens</Typography>;
return <span>{amount} AGIX Tokens</span>;
};

export default AGITokens;
Loading

0 comments on commit af76435

Please sign in to comment.