Skip to content

Commit

Permalink
feat(getdemosection): adjusted demo content based on query params (#2222
Browse files Browse the repository at this point in the history
)
  • Loading branch information
jomarmontuya authored Dec 22, 2023
2 parents cb6a743 + 633498a commit d3a7b9f
Show file tree
Hide file tree
Showing 12 changed files with 382 additions and 305 deletions.
11 changes: 9 additions & 2 deletions src/components/accounts/dashboard/SideContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import React, { memo, useEffect, useState } from 'react';
import * as helpers from 'utils';
import ZMyListItem from './ui/ZMyListItem';
import ZSideListContent from './ui/ZSideListContent';
import { useTheme } from '@mui/material/styles';

import { TOTAL_INSTANCES_LIMIT, TOTAL_TEAMS_LIMIT } from '.';

function SideContent({ initialInstances, unfilteredTotalInstances, teams }) {
const [filteredInstances, setFilteredInstances] = useState([]);

const theme = useTheme();
const isDarkMode = theme.palette.mode === 'dark';
function onChange(e) {
if (e?.target?.value) {
handleSearchInstances(e.target.value.toLocaleLowerCase());
Expand Down Expand Up @@ -66,7 +68,12 @@ function SideContent({ initialInstances, unfilteredTotalInstances, teams }) {
color="primary"
placeholder="Search an Instances"
onChange={onChange}
sx={{ mb: 2 }}
sx={{
mb: 2,
'& .MuiInputBase-root': {
bgcolor: isDarkMode && 'transparent',
},
}}
/>
}
>
Expand Down
7 changes: 6 additions & 1 deletion src/components/accounts/instances/InstanceDashboardV2.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ const InstanceDashboardV2 = () => {
/>

<TextField
label="Search an instances"
placeholder="Search an instances"
InputProps={{
endAdornment: (
<InputAdornment position="start">
Expand All @@ -334,6 +334,11 @@ const InstanceDashboardV2 = () => {
const value = e.target.value?.toLowerCase();
setSearch(value);
}}
sx={{
'& .MuiInputBase-root': {
bgcolor: 'transparent',
},
}}
/>
<Stack direction="row" spacing={2} alignItems="stretch">
<CustomMenu
Expand Down
7 changes: 7 additions & 0 deletions src/components/accounts/ui/input/FormInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ function Index({
border: '2px solid #FF5D0A',
},
},
'& .MuiInputBase-root': {
bgcolor: 'transparent',
},
}}
/>
) : (
Expand All @@ -86,6 +89,7 @@ function Index({
height: '40px',
borderRadius: '8px',
fontSize: '14px',

'& fieldset': {
border: '1px solid #F2F4F7',
},
Expand All @@ -96,6 +100,9 @@ function Index({
border: '2px solid #FF5D0A',
},
},
'& .MuiInputBase-root': {
bgcolor: 'transparent',
},
}}
{...defaultProps}
type={showPassword ? 'text' : 'password'}
Expand Down
3 changes: 3 additions & 0 deletions src/components/accounts/ui/select/AccountsComboBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ const Index = ({
border: `1px solid ${grey[200]}`,
borderRadius: '8px',
},
'& .MuiInputBase-root': {
bgcolor: 'transparent',
},
}}
placeholder={placeholder}
InputProps={{
Expand Down
1 change: 1 addition & 0 deletions src/layouts/Main/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ const Main = ({
py: 1,
display: router?.query?.slug?.[0] === 'login' && 'none',
borderBottom: (isLoggedIn || isDocsPage) && `1px solid ${grey[200]}`,
zIndex: 9999,
}}
elevation={trigger ? 1 : 0}
>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/[[...zesty]].js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export async function getServerSideProps({ req, res, resolvedUrl }) {
docs,
},
algolia: {
apiKey: process.env.ALGOLIA_APIKEY,
apiKey: process.env.ALGOLIA_SEARCH_KEY,
appId: process.env.ALGOLIA_APPID,
index: process.env.ALGOLIA_INDEX,
},
Expand Down
Loading

0 comments on commit d3a7b9f

Please sign in to comment.