diff --git a/vitreum/headtags.js b/vitreum/headtags.js deleted file mode 100644 index 8e0d06523..000000000 --- a/vitreum/headtags.js +++ /dev/null @@ -1,79 +0,0 @@ -import React from 'react'; - -const obj2props = (obj)=>Object.entries(obj).map(([k,v])=>`${k}="${v}"`).join(' '); -const toStr = (chld)=>Array.isArray(chld) ? chld.join('') : chld; -const onServer = (typeof window === 'undefined'); - -const injectTag = (tag, props, children)=>{ - const injectNode = document.createElement(tag); - Object.entries(props).map(([key, val])=>injectNode[key]=val); - if(children) injectNode.appendChild(document.createTextNode(children)); - document.getElementsByTagName('head')[0].appendChild(injectNode); -}; - - -let NamedTags = {}; -let UnnamedTags = []; - - -const HeadComponents = { - Title({ children }){ - if(onServer) NamedTags.title = `