Skip to content

Commit

Permalink
[plasmic] Sync project pricing
Browse files Browse the repository at this point in the history
This is an automated commit generated by Hojat Khajavi
using Plasmic (https://plasmic.app/).

Project name: pricing
Project URL: https://studio.plasmic.app/projects/seYsnBL1P3AiXaFGNEMUUM
  • Loading branch information
plasmicops committed Jul 10, 2024
1 parent fe39f32 commit 56ad56a
Show file tree
Hide file tree
Showing 4 changed files with 112 additions and 5 deletions.
11 changes: 9 additions & 2 deletions components/plasmic/pricing/PlasmicHomepage.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,21 @@
padding-left: 0px;
}
}
.btnLogout {
position: relative;
height: auto;
max-width: 100%;
text-align: center;
user-select: none;
margin-right: 5px;
cursor: pointer;
}
.lblUser {
position: relative;
width: 100%;
height: auto;
max-width: 100%;
text-align: center;
user-select: none;
min-width: 0;
}
@media (min-width: 0px) and (max-width: 768px) {
.lblUser {
Expand Down
99 changes: 99 additions & 0 deletions components/plasmic/pricing/PlasmicHomepage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export type PlasmicHomepage__OverridesType = {
root?: Flex__<"div">;
h1?: Flex__<"h1">;
btnDashboard3?: Flex__<"div">;
btnLogout?: Flex__<"a"> & Partial<LinkProps>;
lblUser?: Flex__<"div">;
btnLogin?: Flex__<typeof Button>;
btnReservation?: Flex__<"div">;
Expand Down Expand Up @@ -539,6 +540,12 @@ function PlasmicHomepage__RenderFunc(props: {
type: "private",
variableType: "boolean",
initFunc: ({ $props, $state, $queries, $ctx }) => false
},
{
path: "btnLogoutShow",
type: "private",
variableType: "boolean",
initFunc: ({ $props, $state, $queries, $ctx }) => true
}
],
[$props, $ctx, $refs]
Expand Down Expand Up @@ -753,6 +760,59 @@ function PlasmicHomepage__RenderFunc(props: {
</div>
</div>
<div className={classNames(projectcss.all, sty.freeBox__w4DUt)}>
{(() => {
try {
return $state.btnLogoutShow;
} catch (e) {
if (
e instanceof TypeError ||
e?.plasmicType === "PlasmicUndefinedDataError"
) {
return true;
}
throw e;
}
})() ? (
<PlasmicLink__
data-plasmic-name={"btnLogout"}
data-plasmic-override={overrides.btnLogout}
className={classNames(
projectcss.all,
projectcss.a,
projectcss.__wab_text,
sty.btnLogout
)}
component={Link}
href={
"https://paziresh24.com/logout/?redirect_url=https://pricing.paziresh24.com"
}
onClick={async event => {
const $steps = {};

$steps["invokeGlobalAction"] = true
? (() => {
const actionArgs = { args: [] };
return $globalActions[
"Fragment.apiRequest"
]?.apply(null, [...actionArgs.args]);
})()
: undefined;
if (
$steps["invokeGlobalAction"] != null &&
typeof $steps["invokeGlobalAction"] === "object" &&
typeof $steps["invokeGlobalAction"].then ===
"function"
) {
$steps["invokeGlobalAction"] = await $steps[
"invokeGlobalAction"
];
}
}}
platform={"nextjs"}
>
{"\u062e\u0631\u0648\u062c"}
</PlasmicLink__>
) : null}
<div
data-plasmic-name={"lblUser"}
data-plasmic-override={overrides.lblUser}
Expand Down Expand Up @@ -8165,6 +8225,41 @@ function PlasmicHomepage__RenderFunc(props: {
) {
$steps["updateUser4"] = await $steps["updateUser4"];
}

$steps["btnLogout"] =
$steps.checkUser.status == 200
? (() => {
const actionArgs = {
variable: {
objRoot: $state,
variablePath: ["btnLogoutShow"]
},
operation: 0,
value: true
};
return (({
variable,
value,
startIndex,
deleteCount
}) => {
if (!variable) {
return;
}
const { objRoot, variablePath } = variable;

$stateSet(objRoot, variablePath, value);
return value;
})?.apply(null, [actionArgs]);
})()
: undefined;
if (
$steps["btnLogout"] != null &&
typeof $steps["btnLogout"] === "object" &&
typeof $steps["btnLogout"].then === "function"
) {
$steps["btnLogout"] = await $steps["btnLogout"];
}
}}
/>
</div>
Expand All @@ -8179,6 +8274,7 @@ const PlasmicDescendants = {
"root",
"h1",
"btnDashboard3",
"btnLogout",
"lblUser",
"btnLogin",
"btnReservation",
Expand Down Expand Up @@ -8236,6 +8332,7 @@ const PlasmicDescendants = {
],
h1: ["h1"],
btnDashboard3: ["btnDashboard3"],
btnLogout: ["btnLogout"],
lblUser: ["lblUser"],
btnLogin: ["btnLogin"],
btnReservation: ["btnReservation"],
Expand Down Expand Up @@ -8327,6 +8424,7 @@ type NodeDefaultElementType = {
root: "div";
h1: "h1";
btnDashboard3: "div";
btnLogout: "a";
lblUser: "div";
btnLogin: typeof Button;
btnReservation: "div";
Expand Down Expand Up @@ -8445,6 +8543,7 @@ export const PlasmicHomepage = Object.assign(
// Helper components rendering sub-elements
h1: makeNodeComponent("h1"),
btnDashboard3: makeNodeComponent("btnDashboard3"),
btnLogout: makeNodeComponent("btnLogout"),
lblUser: makeNodeComponent("lblUser"),
btnLogin: makeNodeComponent("btnLogin"),
btnReservation: makeNodeComponent("btnReservation"),
Expand Down
3 changes: 2 additions & 1 deletion plasmic.json
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,8 @@
"componentImportPath": "@plasmicapp/react-web/lib/data-sources"
}
],
"customFunctions": []
"customFunctions": [],
"jsBundleThemes": []
},
{
"projectId": "seYsnBL1P3AiXaFGNEMUUM",
Expand Down
4 changes: 2 additions & 2 deletions plasmic.lock
Original file line number Diff line number Diff line change
Expand Up @@ -324,12 +324,12 @@
{
"type": "renderModule",
"assetId": "g64VYoCfAKTS",
"checksum": "43cafeefc966a4d7e1eeccc66ec18ad0"
"checksum": "ad09af7586a74665f531dd7ae2857f9d"
},
{
"type": "cssRules",
"assetId": "g64VYoCfAKTS",
"checksum": "43cafeefc966a4d7e1eeccc66ec18ad0"
"checksum": "ad09af7586a74665f531dd7ae2857f9d"
},
{
"type": "renderModule",
Expand Down

0 comments on commit 56ad56a

Please sign in to comment.