From 8a1c5bcbeb8960e0a3a87e5249501ef798ee3576 Mon Sep 17 00:00:00 2001 From: ammarahm-ed Date: Thu, 2 Dec 2021 14:15:00 +0500 Subject: [PATCH] make notebook header similar to web app --- .../components/SimpleList/notebookheader.js | 69 +++++-------------- 1 file changed, 19 insertions(+), 50 deletions(-) diff --git a/apps/mobile/src/components/SimpleList/notebookheader.js b/apps/mobile/src/components/SimpleList/notebookheader.js index e74efef24..d1e39a752 100644 --- a/apps/mobile/src/components/SimpleList/notebookheader.js +++ b/apps/mobile/src/components/SimpleList/notebookheader.js @@ -1,8 +1,9 @@ import React, {useState} from 'react'; -import {View} from 'react-native'; +import {Platform, View} from 'react-native'; import {useTracked} from '../../provider'; import {useMenuStore} from '../../provider/stores'; import {ToastEvent} from '../../services/EventManager'; +import {getTotalNotes} from '../../utils'; import {db} from '../../utils/database'; import {SIZE} from '../../utils/SizeUtils'; import {ActionIcon} from '../ActionIcon'; @@ -17,6 +18,7 @@ export const NotebookHeader = ({notebook, onPress, onEditNotebook}) => { db.settings.isPinned(notebook.id) ); const setMenuPins = useMenuStore(state => state.setMenuPins); + const totalNotes = getTotalNotes(notebook); const onPinNotebook = async () => { try { @@ -46,6 +48,9 @@ export const NotebookHeader = ({notebook, onPress, onEditNotebook}) => { borderRadius: 10, paddingTop: 25 }}> + + {new Date(notebook.dateEdited).toLocaleString()} + { flexDirection: 'row' }}> @@ -90,57 +94,22 @@ export const NotebookHeader = ({notebook, onPress, onEditNotebook}) => { {notebook.description} )} - {/* -