I'm trying to make a ClojureScript website using re-frame, reagent, and bootstrap. I'm trying to get subscriptions to work globally instead of locally. Here's the test page:

(ns jimmystore.pages.test-page
  (:require
   [ajax.core :as ajax]
   [jimmystore.image-utils :as image-utils]
   [re-frame.core :as rf]
   [reagent.core :as ra]))

(rf/reg-event-fx ::test-upload-file
  (fn [{:keys [db]} [_ reference-id type]]
    (let [form-data           (js/FormData.)
          {:keys [file size]} (get db :upload)]
      (.append form-data "file" file)
      {:db         (assoc-in db [:api-service :block-ui] true)
       :http-xhrio {:method          :post
                    :uri             "/test-upload"
                    :timeout         60000
                    :body            form-data
                    :response-format (ajax/json-response-format {:keywords? true})
                    :on-success      [::get-items-test]
                    :on-failure      [:no-op]}})))

(rf/reg-event-db ::retrieve-item-picture-success
  (fn [db [_ response]]
    (assoc db ::img response)))

(rf/reg-sub ::img
  (fn [db _]
    (::img db)))


(rf/reg-sub ::items
  (fn [db _]
    (::items db)))

(rf/reg-event-fx ::get-items-test
  (fn [_ _]
    {:http-xhrio {:method          :get
                  :uri             "/get-items"
                  :response-format (ajax/json-response-format {:keywords? true})
                  :on-success      [::get-items-test-success]}}))

(rf/reg-event-db ::get-items-test-success
  (fn [db [_ response]]
    (assoc db ::items response)))


(defn get-file [file-event]
  (-> file-event .-target .-files (aget 0)))

(defn- upload-form []
  [:div {:class "mb-3"}
   [:label {:for   "formFile"
            :class "form-label"}
    "Upload test"]
   [:div {:class "input-group"}
    [:input {:id    "formFile"
             :class "form-control"
             :type  :file
             :aria-describedby "inputGroupFileAddon"
             :aria-label       "Upload"
             :on-change #(rf/dispatch [:set-file-to-upload (get-file %)])}]
    [:button {:id       "inputGroupFileAddon"
              :class    "btn btn-outline-secondary"
              :type     :button
              :disabled (nil? @(rf/subscribe [:upload]))
              :on-click #(rf/dispatch [::test-upload-file])}
     "Upload"]]])

(defn page []
  (ra/with-let [_     (rf/dispatch [::get-items-test])
                img   (rf/subscribe [::img])
                items (rf/subscribe [::items])
                txt   (ra/atom "")]
    [:section.section>div.container>div.content
     [upload-form]
     [:input {:place-holder "Enter id here"
              :on-change    #(reset! txt (-> % .-target .-value))}]
     [:button {:on-click #(rf/dispatch [:retrieve-item-picture @txt
                                        [::retrieve-item-picture-success]])}
      "Retrieve"]
     (when @img
       [:img {:src (image-utils/img-blob->img-src @img)} ])
     [:p (str @items)]]))

(def page-info {:page-id :test-page
                :view   #'page})

And here's the events.cljs file:

(ns jimmystore.events
  (:require
    [re-frame.core :as rf]
    [ajax.core :as ajax]
    [reitit.frontend.easy :as rfe]
    [reitit.frontend.controllers :as rfc]))

;;dispatchers

(rf/reg-event-db
  :common/navigate
  (fn [db [_ match]]
    (def foo match)
    (let [old-match (:common/route db)
          new-match (assoc match :controllers
                           (rfc/apply-controllers (:controllers old-match) match))]
      (assoc db :common/route new-match))))

(rf/reg-fx :common/navigate-fx!
  (fn [[k & [params query]]]
    (rfe/push-state k params query)))

(rf/reg-event-fx :common/navigate!
  (fn [_ [_ url-key params query]]
    {:common/navigate-fx! [url-key params query]}))

(rf/reg-event-db :set-docs
  (fn [db [_ docs]]
    (assoc db :docs docs)))

(rf/reg-event-fx :fetch-docs
  (fn [_ _]
    {:http-xhrio {:method          :get
                  :uri             "/docs"
                  :response-format (ajax/raw-response-format)
                  :on-success       [:set-docs]}}))

(rf/reg-event-fx :test-get-api
 (fn [_ _]
   {:http-xhrio {:method          :get
                 :uri             "/test-get"
                 :response-format (ajax/json-response-format {:keywords? true})
                 :on-success       [:set-docs]}}))

(rf/reg-event-fx :test-post-api
  (fn [_ _]
    {:http-xhrio {:method          :post
                  :uri             "/test-post"
                  :params          {:test-post {:data 1 :foo :bar 2 "ASDASD"}}
                  :format          (ajax/json-request-format)
                  :response-format (ajax/json-response-format {:keywords? true})
                  :on-success      [:no-op]}}))

(defn- get-file-size [file]
  (.-size file))

(defn- get-file-name [file]
  (.-name file))

(defn- get-file-type [file]
  (.-type file))

(rf/reg-event-db :set-file-to-upload
 (fn [db [_ file]]                ;; Local url (for previews etc.)
   (assoc db :upload {:object-url (js/window.webkitURL.createObjectURL file)
                      :file       file
                      :size       (get-file-size file)
                      :name       (get-file-name file)
                      :type       (get-file-type file)})))


(rf/reg-sub :upload
 (fn [db _]
   (-> db :upload)))

(rf/reg-event-db :common/set-error
  (fn [db [_ error]]
    (assoc db :common/error error)))

(rf/reg-event-fx :page/init-home
  (fn [_ _]
    {:dispatch [:fetch-docs]}))

(rf/reg-event-db :no-op
 (fn [db  _]
   db))

;;subscriptions

(rf/reg-sub :common/route
  (fn [db _]
    (-> db :common/route)))

(rf/reg-sub :common/page-id
  :<- [:common/route]
  (fn [route _]
    (-> route :data :name)))

(rf/reg-sub :common/page
  :<- [:common/route]
  (fn [route _]
    (-> route :data :view)))

(rf/reg-sub :docs
  (fn [db _]
    (:docs db)))

(rf/reg-sub :common/error
  (fn [db _]
    (:common/error db)))


(rf/reg-sub :img
  (fn [db _]
    (:img db)))


(rf/reg-sub :items
  (fn [db _]
    (:items db)))

The test_page.cljs is in a "pages" subfolder. What do I need to do in order to remove the duplicate img and items subscription code from the test page and have it work for all pages?