-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2687 from starknet-io/Blog-posts-latests-updates-…
…side-banner Blog post Latest Announcements side banner
- Loading branch information
Showing
27 changed files
with
634 additions
and
335 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
- isActive: true | ||
image: https://www.starknet.io/assets/final-.jpeg | ||
text: What are onramps and cross rollup bridges? | ||
buttonText: See more | ||
buttonLink: / | ||
- isActive: true | ||
image: https://www.starknet.io/assets/guide-image-3-.jpg | ||
text: What are onramps and cross rollup bridges? | ||
buttonText: See more | ||
buttonLink: / |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { getJSON } from "@starknet-io/cms-utils/src/index"; | ||
|
||
export type LatestAnnouncements = { | ||
readonly image: string; | ||
readonly text: string; | ||
readonly buttonText: string; | ||
readonly buttonLink: string; | ||
readonly isActive: boolean; | ||
}; | ||
|
||
export async function getLatestAnnouncements( | ||
context: EventContext<{}, any, Record<string, unknown>> | ||
) { | ||
try { | ||
const latestAnnouncements = await getJSON( | ||
"data/latest-announcements/latest-announcements", | ||
context | ||
); | ||
|
||
return latestAnnouncements; | ||
} catch (cause) { | ||
throw new Error("getLatestAnnouncements failed!", { | ||
cause, | ||
}); | ||
} | ||
} |
Oops, something went wrong.