@washingtonpost/site-footer
Advanced tools
Comparing version 0.4.15 to 0.5.0
@@ -469,2 +469,3 @@ var $kKGuy$react = require("react"); | ||
const $89431fa8bdb22bf5$export$a06f1c675e846f6f = ({ isAmp: isAmp = false , env: env = "prod" , className: className })=>{ | ||
const [dynamicGetThePost, setDynamicGetThePost] = $kKGuy$react.useState($89431fa8bdb22bf5$export$3c9e69fe1141b123); | ||
const useUserDataWithAmp = isAmp ? ()=>{ | ||
@@ -479,2 +480,19 @@ return { | ||
}); | ||
// Remove "Mobile & Apps" link for signed in users w/ app downloaded. See GRO-4403. | ||
$kKGuy$react.useEffect(()=>{ | ||
if (isAuthenticated) { | ||
if (window.registerPwapiConsumer) window.registerPwapiConsumer((pwapiResponse)=>{ | ||
var ref, ref1; | ||
// Early return in case status is not final. | ||
if (!pwapiResponse.status || pwapiResponse.status !== "final") return; | ||
if (pwapiResponse === null || pwapiResponse === void 0 ? void 0 : (ref = pwapiResponse.data) === null || ref === void 0 ? void 0 : (ref1 = ref.userAttributes) === null || ref1 === void 0 ? void 0 : ref1["247394"]) setDynamicGetThePost({ | ||
title: $89431fa8bdb22bf5$export$3c9e69fe1141b123.title, | ||
links: $89431fa8bdb22bf5$export$3c9e69fe1141b123.links.filter(({ name: name })=>name !== "Mobile & Apps" | ||
) | ||
}); | ||
}); | ||
} | ||
}, [ | ||
isAuthenticated | ||
]); | ||
let showDoNotSell = false; | ||
@@ -509,3 +527,3 @@ function checkUserRole(userRole) { | ||
$89431fa8bdb22bf5$export$7b19f4583cbf3961, | ||
$89431fa8bdb22bf5$export$3c9e69fe1141b123, | ||
dynamicGetThePost, | ||
$89431fa8bdb22bf5$export$34512e3b2db52a4e, | ||
@@ -512,0 +530,0 @@ { |
@@ -459,2 +459,3 @@ import $ktYQ7$react, {createElement as $ktYQ7$createElement, useState as $ktYQ7$useState, useEffect as $ktYQ7$useEffect, Fragment as $ktYQ7$Fragment} from "react"; | ||
const $ed3090bc58f3830b$export$a06f1c675e846f6f = ({ isAmp: isAmp = false , env: env = "prod" , className: className })=>{ | ||
const [dynamicGetThePost, setDynamicGetThePost] = $ktYQ7$useState($ed3090bc58f3830b$export$3c9e69fe1141b123); | ||
const useUserDataWithAmp = isAmp ? ()=>{ | ||
@@ -469,2 +470,19 @@ return { | ||
}); | ||
// Remove "Mobile & Apps" link for signed in users w/ app downloaded. See GRO-4403. | ||
$ktYQ7$useEffect(()=>{ | ||
if (isAuthenticated) { | ||
if (window.registerPwapiConsumer) window.registerPwapiConsumer((pwapiResponse)=>{ | ||
var ref, ref1; | ||
// Early return in case status is not final. | ||
if (!pwapiResponse.status || pwapiResponse.status !== "final") return; | ||
if (pwapiResponse === null || pwapiResponse === void 0 ? void 0 : (ref = pwapiResponse.data) === null || ref === void 0 ? void 0 : (ref1 = ref.userAttributes) === null || ref1 === void 0 ? void 0 : ref1["247394"]) setDynamicGetThePost({ | ||
title: $ed3090bc58f3830b$export$3c9e69fe1141b123.title, | ||
links: $ed3090bc58f3830b$export$3c9e69fe1141b123.links.filter(({ name: name })=>name !== "Mobile & Apps" | ||
) | ||
}); | ||
}); | ||
} | ||
}, [ | ||
isAuthenticated | ||
]); | ||
let showDoNotSell = false; | ||
@@ -499,3 +517,3 @@ function checkUserRole(userRole) { | ||
$ed3090bc58f3830b$export$7b19f4583cbf3961, | ||
$ed3090bc58f3830b$export$3c9e69fe1141b123, | ||
dynamicGetThePost, | ||
$ed3090bc58f3830b$export$34512e3b2db52a4e, | ||
@@ -502,0 +520,0 @@ { |
{ | ||
"name": "@washingtonpost/site-footer", | ||
"version": "0.4.15", | ||
"version": "0.5.0", | ||
"description": "> TODO: description", | ||
@@ -37,3 +37,3 @@ "author": "artmsilva <artmsilva@gmail.com>", | ||
"@babel/runtime": "^7.13.10", | ||
"@washingtonpost/site-components": "^6.5.2" | ||
"@washingtonpost/site-components": "^6.5.3" | ||
}, | ||
@@ -43,3 +43,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "8a642d18dc50ba8382e5c8db7a19ac96ac66368b" | ||
"gitHead": "9148e7a18cab0c9ffd9c2cfdb9b31d44ef4adfb2" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
110329
1118