Discover apps app modal opening fixes

This commit is contained in:
monilprajapati
2024-11-23 15:20:12 +05:30
parent 6a422a1eb0
commit 60509dcd18
2 changed files with 182 additions and 183 deletions
+2 -2
View File
@@ -86,7 +86,7 @@ const AppModal = ({ open, onClose, app, userdata }) => {
<div style={{ display: "flex", flexDirection: "row", gap: 10, fontFamily: "Inter" }}>
<img
alt={app?.name}
src={app?.large_image}
src={app?.large_image || app?.image_url}
style={{
borderRadius: 4,
maxWidth: 100,
@@ -201,7 +201,7 @@ const AppModal = ({ open, onClose, app, userdata }) => {
mb: 0.3,
color: '#fff'
}}>
{app?.actions?.length}
{Array.isArray(app?.actions) ? app.actions.length : app?.actions}
</Typography>
<Typography variant="body2" sx={{ color: 'rgba(255, 255, 255, 0.7)' }}>
Actions
+13 -14
View File
@@ -67,11 +67,7 @@ const AppCard = ({ data, index, mouseHoverIndex, setMouseHoverIndex, globalUrl,
width: '100%',
backgroundColor: mouseHoverIndex === index ? "#2F2F2F" : "#212121"
}}
onClick={(event) => {
// if (!event.target.closest('.deactivate-button')) {
// window.location.href = appUrl;
// }
onClick={() => {
handleAppClick(data);
}}
>
@@ -190,6 +186,7 @@ const AppCard = ({ data, index, mouseHoverIndex, setMouseHoverIndex, globalUrl,
const Hits = ({
userdata,
hits,
handleAppClick,
setIsAnyAppActivated,
searchQuery,
globalUrl,
@@ -316,13 +313,13 @@ const Hits = ({
transitionDelay: `${workflowDelay}ms`,
}}
>
<Grid>
<a
href={appUrl}
rel="noopener noreferrer"
target="_blank"
<div
onClick={
() => {
handleAppClick(data);
}
}
style={{
textDecoration: "none",
color: "#f85a3e",
}}
>
@@ -501,8 +498,7 @@ const Hits = ({
</div>
</ButtonBase>
</Paper>
</a>
</Grid>
</div>
</Zoom>
);
})}
@@ -1153,7 +1149,9 @@ const Apps2 = (props) => {
{appsToShow?.length > 0 && appsToShow !== undefined ? (
<div style={{ rowGap: 16, columnGap: 16, marginTop: 16, display: "flex", flexWrap: "wrap", justifyContent: "flex-start", maxHeight: 570, scrollbarWidth: "thin", scrollbarColor: "#494949 #2f2f2f" }}>
{appsToShow.map((data, index) => (
<AppCard key={index} data={data} index={index} mouseHoverIndex={mouseHoverIndex} setMouseHoverIndex={setMouseHoverIndex} globalUrl={globalUrl} deactivatedIndexes={deactivatedIndexes} currTab={currTab}/>
<AppCard key={index} data={data} index={index} mouseHoverIndex={mouseHoverIndex} setMouseHoverIndex={setMouseHoverIndex} globalUrl={globalUrl} deactivatedIndexes={deactivatedIndexes} currTab={currTab}
handleAppClick={handleAppClick}
/>
))}
</div>
) : (
@@ -1172,6 +1170,7 @@ const Apps2 = (props) => {
<CustomHits
isLoggedIn={isLoggedIn}
userdata={userdata}
handleAppClick={handleAppClick}
setIsAnyAppActivated={setIsAnyAppActivated}
hitsPerPage={5}
globalUrl={globalUrl}