From f352be308b4d09a7c2b7b6188893f1317b321754 Mon Sep 17 00:00:00 2001 From: Jeremy Kauffman Date: Mon, 24 Sep 2018 14:55:14 -0400 Subject: [PATCH 1/2] refactor attempt --- app/components/feature-links.js | 29 +---------------------------- app/views/redirect.js | 2 +- 2 files changed, 2 insertions(+), 29 deletions(-) diff --git a/app/components/feature-links.js b/app/components/feature-links.js index b406f4a..c1b565a 100644 --- a/app/components/feature-links.js +++ b/app/components/feature-links.js @@ -1,11 +1,5 @@ "use strict"; - - -// P A C K A G E - -import Component from "choo/component"; - // V A R I A B L E const links = [ // TODO: Update images @@ -45,13 +39,7 @@ const links = [ // TODO: Update images } ]; - - -// P R O G R A M - -FeaturedLinks.prototype = Object.create(Component.prototype); - -FeaturedLinks.prototype.createElement = () => { +export default function () { const renderedLinks = []; let imageLink = ""; @@ -65,21 +53,6 @@ FeaturedLinks.prototype.createElement = () => { `; }; - - -// E X P O R T - -module.exports = exports = FeaturedLinks; - - - -// H E L P E R S - -function FeaturedLinks() { - if (!(this instanceof FeaturedLinks)) return new FeaturedLinks(); - Component.call(this); -} - function returnLinkTemplate(url, title, image) { return `