+
+ {teacherTool.userProfile ? (
+
+ ) : (
-
- {teacherTool.userProfile ? (
-
- ) : (
-
- >
+ )}
+
);
}
+ const privacyUrl = pxt?.appTarget?.appTheme?.privacyUrl;
+ const termsOfUseUrl = pxt?.appTarget?.appTheme?.termsOfUseUrl;
+
+ const getSettingItems = () => {
+ const items: MenuItem[] = [];
+
+ if (privacyUrl) {
+ items.push({
+ id: "privacy",
+ title: Strings.Privacy,
+ label: Strings.Privacy,
+ onClick: () => pxt.tickEvent(Ticks.PrivacyStatementClicked),
+ href: privacyUrl,
+ });
+ }
+
+ if (termsOfUseUrl) {
+ items.push({
+ id: "termsOfUse",
+ title: Strings.TermsOfUse,
+ label: Strings.TermsOfUse,
+ onClick: () => pxt.tickEvent(Ticks.TermsOfUseClicked),
+ href: termsOfUseUrl,
+ });
+ }
+
+ return items;
+ };
+
+ const settingItems = getSettingItems();
+
return (