mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-23 18:17:38 +00:00
Add og image for search
This commit is contained in:
parent
f015436343
commit
8ee7e48983
1 changed files with 10 additions and 4 deletions
|
|
@ -204,10 +204,16 @@ export function getPageTitle(state) {
|
|||
|
||||
export const getPreviewImageUrl = createSelector(
|
||||
getSelectedSkinHash,
|
||||
(hash) => {
|
||||
return hash == null
|
||||
? null
|
||||
: `https://skin-museum-og-captbaritone-webamp.vercel.app/api/og?md5=${hash}`;
|
||||
getSearchQuery,
|
||||
(hash, searchQuery) => {
|
||||
if (hash) {
|
||||
return `https://skin-museum-og-captbaritone-webamp.vercel.app/api/og?md5=${hash}`;
|
||||
} else if (searchQuery) {
|
||||
return `https://skin-museum-og-captbaritone-webamp.vercel.app/api/og?query=${encodeURIComponent(
|
||||
searchQuery
|
||||
)}`;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue