Skip to content

Commit

Permalink
duplicate toolbars
Browse files Browse the repository at this point in the history
  • Loading branch information
ademDurakovic committed Nov 4, 2024
1 parent 39ca926 commit 5d4333c
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions lib/screens/EditNoteScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const EditNoteScreen: React.FC<EditNoteScreenProps> = ({
const [isPublished, setIsPublished] = useState(note.published);
const [creator, setCreator] = useState(note.creator);
const [owner, setOwner] = useState(false);
const scrollViewRef = useRef<ScrollView | null>(null);
//const scrollViewRef = useRef<ScrollView | null>(null);
const [viewMedia, setViewMedia] = useState(false);
const [viewAudio, setViewAudio] = useState(false);
const [isTagging, setIsTagging] = useState(false);
Expand Down Expand Up @@ -178,7 +178,7 @@ const EditNoteScreen: React.FC<EditNoteScreenProps> = ({
...Platform.select({
android: {
height: 70, // Fixed height for the toolbar at the bottom
backgroundColor: theme.tertiaryColor, // Ensure the toolbar has a background color
backgroundColor: theme.primaryColor, // Ensure the toolbar has a background color
overflow: 'hidden', // Ensure no extra space
marginTop: 50
},
Expand All @@ -196,7 +196,6 @@ const EditNoteScreen: React.FC<EditNoteScreenProps> = ({
useEffect(() => {
if (editor) {
editor.injectCSS(textColorCSS, 'text-color-style');
console.log("text color will be: " , theme.text);
}
}, [isDarkmode, editor, theme]);

Expand Down Expand Up @@ -244,7 +243,7 @@ const EditNoteScreen: React.FC<EditNoteScreenProps> = ({
};
checkOwner();
}, [creator]);

/*
const handleScroll = (position) => {
if (keyboardOpen && scrollViewRef.current) {
const viewportHeight = Dimensions.get('window').height - keyboardHeight;
Expand All @@ -259,7 +258,7 @@ const EditNoteScreen: React.FC<EditNoteScreenProps> = ({
}
}
};

*/
const [latitude, setLatitude] = useState(
location?.latitude?.toString() || ""
);
Expand Down Expand Up @@ -432,7 +431,6 @@ const EditNoteScreen: React.FC<EditNoteScreenProps> = ({

if (isDarkmode && editor) {
editor.injectCSS(textColorCSS, 'text-color-style');
console.log("text color will be: #F7F8F9 from IF state");
}
const [isKeyboardVisible, setIsKeyboardVisible] = useState(false);
useEffect(() => {
Expand Down Expand Up @@ -603,10 +601,13 @@ const EditNoteScreen: React.FC<EditNoteScreenProps> = ({
items={DEFAULT_TOOLBAR_ITEMS}
/>
</View>

<Toolbar editor={editor} items={DEFAULT_TOOLBAR_ITEMS} />


{Platform.OS === 'ios' && (
<Toolbar
editor={editor}
items={DEFAULT_TOOLBAR_ITEMS}
/>
)}
</KeyboardAvoidingView>


Expand Down

0 comments on commit 5d4333c

Please sign in to comment.