Skip to content

Commit

Permalink
Update copy
Browse files Browse the repository at this point in the history
  • Loading branch information
filiptronicek committed Oct 2, 2023
1 parent a77118a commit ad98b5b
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions components/dashboard/src/AppNotifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function localizedTime(dateStr: string): JSX.Element {
return <time dateTime={dateStr}>{formatted}</time>;
}

function formatDate(dateString: string): JSX.Element {
export function formatDate(dateString: string): JSX.Element {
const formatted = dayjs.utc(dateString).local().format("MMMM D, YYYY");
return <time dateTime={dateString}>{formatted}</time>;
}
Expand All @@ -44,19 +44,15 @@ const UPDATED_PRIVACY_POLICY: Notification = {
type: "info",
preventDismiss: true,
onClose: async () => {
console.error("Well... happy for you");
const userUpdates = { additionalData: { profile: { acceptedPrivacyPolicyDate: dayjs().toISOString() } } };
const previousUser = await getGitpodService().server.getLoggedInUser();
const user = await getGitpodService().server.updateLoggedInUser(deepMerge(previousUser, userUpdates));

console.log(user);
await getGitpodService().server.updateLoggedInUser(deepMerge(previousUser, userUpdates));
},
message: (
<span className="text-md">
We've updated the Gitpod Privacy Policy on{" "}
<span className="font-semibold">{formatDate(PRIVACY_POLICY_LAST_UPDATED)}</span>.{" "}
We've updated our Privacy Policy.It is available{" "}
<a className="gp-link" href="https://www.gitpod.io/privacy" target="_blank" rel="noreferrer">
Review Privacy Policy
here
</a>
</span>
),
Expand Down

0 comments on commit ad98b5b

Please sign in to comment.