0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-02 17:12:45 +00:00

Regression Fix WIP

This commit is contained in:
David Bolack
2025-03-29 18:47:03 -05:00
parent 565d58bb31
commit 7525e087ff
3 changed files with 6 additions and 7 deletions

View File

@@ -101,10 +101,11 @@ const Snippetbar = createClass({
if(key == 'snippets') {
const result = _.reverse(_.unionBy(_.reverse(newValue), _.reverse(oldValue), 'name')); // Join snippets together, with preference for the child theme over the parent theme
return result.filter((snip)=>snip.gen || snip.subsnippets);
}
};
},
compileSnippets : function() {
console.log('compileSnippets');
let compiledSnippets = [];
let oldSnippets = _.keyBy(compiledSnippets, 'groupName');
@@ -122,6 +123,7 @@ const Snippetbar = createClass({
}
const userSnippetsasJSON = brewSnippetsToJSON(this.props.brew.title || 'New Document', this.props.brew.snippets, this.props.themeBundle.snippets);
console.log(userSnippetsasJSON);
compiledSnippets.push(userSnippetsasJSON);
return compiledSnippets;
@@ -283,11 +285,6 @@ const Snippetbar = createClass({
module.exports = Snippetbar;
const SnippetGroup = createClass({
displayName : 'SnippetGroup',
getDefaultProps : function() {

View File

@@ -451,6 +451,7 @@ const EditPage = createClass({
},
render : function(){
console.log(this.state.themeBundle);
return <div className='editPage sitePage'>
<Meta name='robots' content='noindex, nofollow' />
{this.renderNavbar()}

View File

@@ -97,6 +97,7 @@ const HomePage = createClass({
},
render : function(){
console.log(this.state.themeBundle);
return <div className='homePage sitePage'>
<Meta name='google-site-verification' content='NwnAQSSJZzAT7N-p5MY6ydQ7Njm67dtbu73ZSyE5Fy4' />
{this.renderNavbar()}
@@ -108,7 +109,7 @@ const HomePage = createClass({
onTextChange={this.handleTextChange}
renderer={this.state.brew.renderer}
showEditButtons={false}
snippetBundle={this.state.themeBundle.snippets}
themeBundle={this.state.themeBundle}
onCursorPageChange={this.handleEditorCursorPageChange}
onViewPageChange={this.handleEditorViewPageChange}
currentEditorViewPageNum={this.state.currentEditorViewPageNum}