Use party.id to query embed image instead of shortcode (#422)
The API doesn't understand shortcodes as indexes
This commit is contained in:
parent
0dc03d44f3
commit
2628d1745b
2 changed files with 3 additions and 3 deletions
|
|
@ -19,7 +19,7 @@ const PartyHead = ({ party, meta }: Props) => {
|
|||
const router = useRouter()
|
||||
const locale =
|
||||
router.locale && ['en', 'ja'].includes(router.locale) ? router.locale : 'en'
|
||||
const previewUrl = api.previewUrl(party.shortcode)
|
||||
const previewUrl = api.previewUrl(party.id)
|
||||
|
||||
return (
|
||||
<Head>
|
||||
|
|
|
|||
|
|
@ -139,8 +139,8 @@ class Api {
|
|||
return axios.get(resourceUrl, params)
|
||||
}
|
||||
|
||||
previewUrl(shortcode: string): string {
|
||||
return `${this.url}/parties/${shortcode}/preview`
|
||||
previewUrl(id: string): string {
|
||||
return `${this.url}/parties/${id}/preview`
|
||||
}
|
||||
|
||||
raidGroups(params?: {}) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue