15 lines
320 B
JavaScript
15 lines
320 B
JavaScript
|
import Cookies from 'js-cookie';
|
||
|
|
||
|
const cookies = Cookies.withConverter({
|
||
|
write: (value) => value,
|
||
|
});
|
||
|
|
||
|
export default function init(_pageContext) {
|
||
|
// update tag filter to prevent unexpected expiry
|
||
|
const storedTags = cookies.get('tags');
|
||
|
|
||
|
if (storedTags) {
|
||
|
cookies.set('tags', storedTags, { expires: 400 });
|
||
|
}
|
||
|
}
|