Skip to content

Commit

Permalink
fix(bcd): use Safari icon for iOS WebView (#12214)
Browse files Browse the repository at this point in the history
Fix iOS WebView showing the Android icon instead of the Safari icon

Co-authored-by: Claas Augner <[email protected]>
  • Loading branch information
foxypiratecove37350 and caugner authored Nov 29, 2024
1 parent 5340802 commit f800c24
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,16 @@ function BrowserHeaders({ browsers }: { browsers: BCD.BrowserName[] }) {
}

export function browserToIconName(browser: string) {
const browserStart = browser.split("_")[0];
return browserStart === "firefox" ? "simple-firefox" : browserStart;
if (browser.startsWith("firefox")) {
return "simple-firefox";
} else if (browser === "webview_android") {
return "webview";
} else if (browser === "webview_ios") {
return "safari";
} else {
const browserStart = browser.split("_")[0];
return browserStart;
}
}

export function Headers({
Expand Down

0 comments on commit f800c24

Please sign in to comment.