Skip to content

Commit

Permalink
fix: bug
Browse files Browse the repository at this point in the history
  • Loading branch information
521xueweihan committed Jul 4, 2024
1 parent 1f1a182 commit ffb6fc8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/pages/repository/[rid]/embed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ const EmbedPage: NextPage = () => {
return login();
}
const pageURL = `https://hellogithub.com/repository/${rid}`;
const text = `<a href="${pageURL}" target="_blank"><img src="${svgFile}" alt="Featured|HelloGitHub" style="width: 250px; height: 54px;" width="250" height="54" /></a>`;
let text = '';
if (theme == 'small') {
text = `<a href="${pageURL}" target="_blank"><img src="${svgFile}" alt="Featured|HelloGitHub" /></a>`;
} else {
text = `<a href="${pageURL}" target="_blank"><img src="${svgFile}" alt="Featured|HelloGitHub" style="width: 250px; height: 54px;" width="250" height="54" /></a>`;
}
if (isReady) {
if (copy(text)) {
message.success('代码已复制');
Expand Down Expand Up @@ -105,7 +110,6 @@ const EmbedPage: NextPage = () => {
).toString('utf8');
// 检查响应的字段
if (
decodedString.includes('Featured|HelloGitHub') &&
decodedString.includes(`https://hellogithub.com/repository/${rid}`) &&
decodedString.includes(userInfo?.uid as string)
) {
Expand Down

0 comments on commit ffb6fc8

Please sign in to comment.