             [:div {:style {:marginTop "1em"}}
              (labeled "File size"
                       (common/format-filesize data-size)
-                      (if (or (= data-size "0") (clojure.string/blank? data-size))
+                      (if data-empty
                         (react/create-element [:span {:style {:marginLeft "2em" :fontWeight "bold"}} "File Empty"])
                         (react/create-element
                           [:span {:style {:marginLeft "1em"}}

             labeled (fn [label & contents]
                       [:div {}
                        [:div {:style {:display "inline-block" :width 185}} (str label ": ")]
                        contents])]
         [:div {:style {:width 700 :overflow "auto"}}
          (labeled "Google Bucket" (:bucket-name props))
          (labeled "Object" (:object props))
          [:div {:style {:marginTop "1em"}}
           [:div {} (when-not (or (= data-size "0") (clojure.string/blank? data-size))
                      "Previews for some filetypes may be unsupported. ")]
           (when (> data-size preview-byte-count) (str "Last " (:preview-line-count @state)
                                                       " lines are shown. Use link below to view entire file."))
           ;; The max-height of 206 looks random, but it's so that the top line of the log preview is half cut-off
           ;; to hint to the user that they should scroll up.
           (when-not (or (= data-size "0") (clojure.string/blank? data-size))
             (react/create-element
               [:div {:ref "preview" :style {:marginTop "1em" :whiteSpace "pre-wrap" :fontFamily "monospace"
                                             :fontSize "90%" :overflowY "auto" :maxHeight 206

         (if (= bucket-name workspace-bucket)
           object
           (if link-label (str link-label) (str "gs://" bucket-name "/" object)))]]))})

