Skip to content

Commit b79afcc

Browse files
authored
Merge pull request framer#332 from framer/hubspot-menu
Hubspot: add plugin menu
2 parents 69f1f11 + 6bb8205 commit b79afcc

8 files changed

Lines changed: 22 additions & 8 deletions

File tree

plugins/hubspot/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"dependencies": {
1616
"@tanstack/react-query": "^5.81.5",
1717
"classnames": "^2.5.1",
18-
"framer-plugin": "^3.3.2",
18+
"framer-plugin": "^3.5.2",
1919
"motion": "^12.23.0",
2020
"react": "^18.3.1",
2121
"react-dom": "^18.3.1",

plugins/hubspot/src/App.tsx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const routes: Route[] = [
2828
path: "/canvas",
2929
element: CanvasMenuPage,
3030
size: {
31-
height: 546,
31+
height: 561,
3232
},
3333
children: [
3434
{
@@ -186,6 +186,19 @@ export function App() {
186186
return
187187
}
188188

189+
void framer.setMenu([
190+
{
191+
label: "Log Out",
192+
visible: true,
193+
onAction: () => {
194+
auth.logout()
195+
framer.closePlugin(
196+
"To fully remove the integration, uninstall the Framer app from the HubSpot integrations dashboard."
197+
)
198+
},
199+
},
200+
])
201+
189202
if (isInCMSModes) {
190203
return handleCMSModes()
191204
}

plugins/hubspot/src/blog.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ function getFieldDataEntryInput(field: ManagedCollectionFieldInput, value: unkno
141141
}
142142

143143
case "collectionReference":
144-
case "multiCollectionReference": {
144+
case "multiCollectionReference":
145+
case "array": {
145146
// TODO: Implement
146147
return undefined
147148
}

plugins/hubspot/src/components/PageErrorBoundaryFallback.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const PageErrorBoundaryFallback = ({ children }: PropsWithChildren) => (
3232
void framer.closePlugin()
3333
}}
3434
>
35-
logout
35+
log out
3636
</a>
3737
.
3838
</span>

plugins/hubspot/src/pages/Auth.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export default function AuthPage() {
6464
</p>
6565
</div>
6666
</div>
67-
<Button className="w-full mt-auto" onClick={login} isLoading={isLoading} variant="secondary">
67+
<Button className="w-full" onClick={login} isLoading={isLoading} variant="secondary">
6868
Log In
6969
</Button>
7070
</main>

plugins/hubspot/src/pages/canvas/Account.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default function AccountPage() {
2929
<p>{user.hub_id}</p>
3030
</div>
3131
<button className="framer-button-destructive w-full" onClick={handleLogout}>
32-
Logout
32+
Log Out
3333
</button>
3434
</main>
3535
)

plugins/hubspot/src/pages/canvas/Menu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export default function MenuPage() {
6262

6363
return (
6464
<main>
65-
<div className="col-lg items-center pt-[30px] pb-15">
65+
<div className="col-lg items-center py-[30px]">
6666
<Logo />
6767
<div className="col items-center">
6868
<h6>Welcome to HubSpot</h6>

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4928,7 +4928,7 @@ __metadata:
49284928
"@types/react": "npm:^18.3.23"
49294929
"@types/react-dom": "npm:^18.3.7"
49304930
classnames: "npm:^2.5.1"
4931-
framer-plugin: "npm:^3.3.2"
4931+
framer-plugin: "npm:^3.5.2"
49324932
motion: "npm:^12.23.0"
49334933
react: "npm:^18.3.1"
49344934
react-dom: "npm:^18.3.1"

0 commit comments

Comments
 (0)