-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
As of hs cli v7, hs project upload no longer takes an argument (will …
…fail with "Unknown argument: .")
- Loading branch information
Aaron Mead
committed
Feb 6, 2025
1 parent
4fca49a
commit c7f7821
Showing
21 changed files
with
4,135 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
...getting-started/getting-started-project/getting-started-app/components/islands/MyTeam.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
interface Teammate { | ||
firstname: string; | ||
lastname: string; | ||
} | ||
|
||
interface MyTeamProps { | ||
total: number; | ||
teammates: Teammate[]; | ||
} | ||
|
||
export default function MyTeam({ total, teammates }: MyTeamProps) { | ||
const hasTeammateData: boolean = !!teammates; | ||
|
||
function Teammates({ teammateData }) { | ||
return ( | ||
<> | ||
<div> | ||
<h2>My Team</h2> | ||
<ul> | ||
{teammateData.map((teammate, idx) => ( | ||
<li key={idx}> | ||
{teammate.firstname} {teammate.lastname} | ||
</li> | ||
))} | ||
</ul> | ||
</div> | ||
</> | ||
); | ||
} | ||
|
||
return ( | ||
<div> | ||
<div> | ||
{hasTeammateData && <Teammates teammateData={teammates} />} | ||
{!hasTeammateData && <h2>No teammates found</h2>} | ||
</div> | ||
</div> | ||
); | ||
} |
32 changes: 32 additions & 0 deletions
32
...ng-started/getting-started-project/getting-started-app/components/islands/VideoIsland.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { VideoPlayer } from '@hubspot/cms-components'; | ||
type PlayerType = 'hsvideo2' | 'simple-html5'; | ||
type ConversionAsset = { | ||
type: 'CTA' | 'FORM'; | ||
id: string; | ||
position: 'PRE' | 'POST' | 'CUSTOM'; | ||
}; | ||
type HubSpotVideoParams = { | ||
player_id: number; | ||
width: number; | ||
height: number; | ||
max_width?: number; | ||
max_height?: number; | ||
autoplay: boolean; | ||
hide_controls: boolean; | ||
loop_video: boolean; | ||
mute_by_default: boolean; | ||
player_type: PlayerType; | ||
}; | ||
|
||
type VideoPlayerProps = { | ||
hubspotVideo: HubSpotVideoParams; | ||
}; | ||
|
||
export default function VideoIsland(props: VideoPlayerProps) { | ||
const { hubspotVideo } = props; | ||
return ( | ||
<> | ||
<VideoPlayer hubspotVideo={hubspotVideo} /> | ||
</> | ||
); | ||
} |
60 changes: 60 additions & 0 deletions
60
...ing-started/getting-started-project/getting-started-app/components/modules/Test/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import weatherStyles from '../../../styles/weather.module.css'; | ||
|
||
import { | ||
BooleanField, | ||
ModuleFields, | ||
RepeatedFieldGroup, | ||
TextField, | ||
VideoField, | ||
RichTextField, | ||
ImageField, | ||
} from '@hubspot/cms-components/fields'; | ||
import VideoIsland from '../../islands/VideoIsland.tsx?island'; | ||
import MyTeam from '../../islands/MyTeam.tsx?island'; | ||
|
||
import { | ||
RichText, | ||
getHubID, | ||
// VideoPlayer, | ||
// Image, | ||
Island, | ||
} from '@hubspot/cms-components'; | ||
// import { RichText } from '@hubspot/cms-components'; | ||
|
||
export function Component(props: any) { | ||
console.log('props', arguments); | ||
const { fieldValues } = props; | ||
// const { hubspotVideo, default_todos } = fieldValues; | ||
|
||
return ( | ||
<div> | ||
{/* <Image imageField={imageField} /> */} | ||
Video in Island | ||
{/* <Island module={VideoIsland} hubspotVideo={hubspotVideo} /> */} | ||
<hr /> | ||
Video Not in Island | ||
{/* <VideoPlayer | ||
tag={'div'} | ||
style={{ border: '1px solid red' }} | ||
hubspotVideo={hubspotVideo} | ||
/> */} | ||
Richtext2 | ||
<div className={weatherStyles.testClass} /> | ||
<RichText fieldPath="richTextField" data-attr="test" /> | ||
{/* player_id="52655782663" /> */} | ||
{/* <RichText fieldPath="@hubspot/richtest" /> */} | ||
<hr></hr> | ||
Todos : | ||
<br /> | ||
{/* {default_todos.map((todo, idx) => ( | ||
<p key={'todo' + idx}> | ||
Todo: {todo.text} - {todo.completed ? 'Complete' : 'Incomplete'} | ||
</p> | ||
))} */} | ||
</div> | ||
); | ||
} | ||
|
||
export const meta = { | ||
label: 'Test Module', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.